5.211.65-X to 6.12.65 upgrade script

Success!

Now should I pass ‘asterisk-version-switch’ before or after the reboot if I want Asterisk 12 too (says any time).

Update1: Well I tried it before reboot, in the spirit of beta testing.

Update2: things seem to be working well, apart from the 42 unsigned modules (which seems to be a lot more than anyone else has reported in this thread).

That is not right. You should have none or a couple at most.

Want me to enable VPN and let someone look?

Nope but feel free to open a support ticket and talk with someone in support.

Otherwise you sure its not just something cached?

This command

amportal a ma refreshsignatures

Tells FreePBX to refresh all signatures and works for everyone else.

It doesn’t appear to be cached, refreshing doesn’t fix. It looks like the version numbers of the 42 unsigned modules are older (2.11) branch… maybe the script could be modified to FORCE update of all modules?

I wonder if this happened because I ran the script that had the extra ’ in it? The new one you provided completes without error, but it obviously didn’t update some modules.

It already does that.

Ok then here is the sequence of events:

  1. updated all modules on my freepbx xtreme 100 applicance via module admin
  2. updated from 5.211.65-13 to -15 using SysAdmin Pro update feature
  3. ran script with typo in it that tony later fixed, it did not complete
  4. ran fixed script which appeared to have completed without errors
  5. performed version-switch to Asterisk 12
  6. Reboot
  7. WebGUI shows 42 unsigned modules

did you run amportal a ma refreshsignatures like tony said?

Mmmm… only for test purpose I reverted to 5.211.65-14. Then I upgraded to 5.211.65-15 through web gui.
This time the upgrade script to 6.12.65 hangs in this manner:

Fetching FreePBX settings with gen_amp_conf.php…

Downloading 0 of 3419591 (0%) --2014-07-26 22:23:40-- http://mirror1.freepbx.org/modules/packages/framework/framework-2.11.0.38.tgz?installid=e009b1c5c2c78ac074dc2268c5244034
Resolving mirror1.freepbx.org… 162.253.134.144
Connecting to mirror1.freepbx.org|162.253.134.144|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3419591 (3.3M) [application/octet-stream]
Saving to: â/var/www/html/admin/modules/_cache/framework-2.11.0.38.tgzâ

100%[======================================>] 3,419,591 743K/s in 5.2s

2014-07-26 22:23:46 (642 KB/s) - â/var/www/html/admin/modules/_cache/framework-2.11.0.38.tgzâ

Downloading 3419591 of 3419591 (100%)

Untaring…Done
Module framework successfully downloaded
Module framework successfully installed
Downloading 0 of 3419591 (0%) --2014-07-26 22:23:50-- http://mirror1.freepbx.org/modules/packages/framework/framework-2.11.0.38.tgz?installid=e009b1c5c2c78ac074dc2268c5244034
Resolving mirror1.freepbx.org… 162.253.134.144
Connecting to mirror1.freepbx.org|162.253.134.144|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3419591 (3.3M) [application/octet-stream]
Saving to: â/var/www/html/admin/modules/_cache/framework-2.11.0.38.tgzâ

100%[======================================>] 3,419,591 940K/s in 4.2s

2014-07-26 22:23:55 (789 KB/s) - â/var/www/html/admin/modules/_cache/framework-2.11.0.38.tgzâ

Downloading 3419591 of 3419591 (100%)

Untaring…Done
Module framework successfully downloaded
Module framework successfully installed
An error has occurred updating to FreePBX 12

The last time I upgraded from 5.211.65-14 to 6.12.65 the upgrade script went good

Yes, I did after I saw so many unsigned modules. When I get a chance I may roll back to 5.211.65-13 and try the upgrade from there. Thanks for doing your testing.

mmmm… Tony,
now I reverted to 5.211.65-14, but the new upgrade script to 6.12 stops in the same way.
As you can see in the past posts I used your old upgrade script with success from 5.211.65-14 to 6.12

Moreover, I have a copy of your old script dated 9 july 2014 and if I run this old script I can go on 6.12 without any issues

I don’t even know how you are reverting. Can you explain your process?

You are looping over downloading framework 2.11. Which means the database table has you marked at 2.11 not 12

I’m able to quickly revert to previous version because my freepbx is a virtual machine and I have a snapshot of every upgrade.

I just took a fresh 5.211.65-15 and upgraded it to 6.12.65 with the script with no issues at all. Worked flawless

I believe you, but I took the same test right now and I get the same result:
From 5.211.65-14 + new upgrade script = An error has occurred updating to FreePBX 12
from 5.211.65-15 + new upgrade script = An error has occurred updating to FreePBX 12

From 5.211.65-9/13 + old upgrade script(7/9/14) = Upgrade OK(but only if I previusly uninstall userman&xmpp)
From 5.211.65-14 + old upgrade script(7/9/14) = Upgrade Ok(userman was up to date in snapshot)
from 5.211.65-15 + old upgrade script(7/9/14) = Upgrade Ok(userman was up to date in snapshot)

It’s not a big deal for me, because I can upgrade easly, but I think it’s best to signaling you this behaviour.
PS: after the error I receive this mail:
SECURITY NOTICE: There is 1 module vulnerable to security threats framework (Cur v. 2.11.0.38) should be upgraded to v. 12.0.1alpha22 to fix security issues: SEC-2014-001, SEC-2012-001

If I uninstall each module and then reinstall, it doesn’t fix the issue.

If I uninstall, remove, re-download and install it takes each module out of the unsigned list.

Sounds like the script may force reinstall on the modules, but if the user has a locally stored installer package it skips downloading them over and this is where the unsigned module part comes into play.

Is there a way to whack all my locally stored installer packages, re-run the script, and have it force update these modules? I REALLY don’t want to have to uninstall, remove, reinstall 40 times.

amportal a ma deleteall

followed by

amportal a ma installall

will delete all of the modules, then re-install them… most of your data will survive, but some modules and settings will be wiped by the removal of all modules, and require re-entry.

This is what refresh signatures does

I have run amportal a ma refreshsignatures a hundred times.

Will try delete and install.

Deleteall & installall got me down to 20 or so unsigned modules, I ran refreshsignatures again and it somehow broke the webgui, amportal restart didn’t fix.

Finally, I ran the upgrade script again (thinking wth not) and noticed it took a lot longer this time and now everything is happy after reboot. Don’t know if all of these convoluted steps will help anyone, but it is what it is.

After all of the above I still had some weirdness where it said there was an update available for tts, so I uninstalled tts and ttsengine, removed them, and reinstalled them.

Now no unsigned modules or security warnings.

I do however have:

PJSIP Not Supported
Your SIP Channel Driver (ASTSIPDRIVER) was automatically changed from both to chan_sip because chan_pjsip is not supported on your Asterisk installation

Even thought I AM running Asterisk 12… Should I switch to 11 and then back to 12 since I had the other problems along the way?