Things to be aware of for a successful FreePBX 15 to 16 upgrade

The versionupgrade module does a couple of stupid things.
Here is my ticket on the subject for anyone that wants gory details

Note: I do everything with an upgrade via the command line. This has always worked out better than using the GUI.

First, it messes up a file permission in /var/www/html, so you need to run fwconsole chown after you install it.
Second, if you run it with sudo from a user other than root, it fails to properly do everything, even though it says the upgrade succeeds.
Third, it does not check for ioncube to already be installed. Fixed in version upgrade 15.0.19
Fourth, it puts in the sng7php74 repo file more than one time.

So, to make your experience better, here is how I would run the upgrade from FreePBX 15 to 16

  1. Login with your non-root user. Because you never allow root to log in over ssh right?
  2. Update the system
sudo yum upgrade -y
  1. Remove ioncube if you already have it installed (most people will not), not required if your version upgrade versions is 15.0.19 or later.
sudo yum remove ioncube-loader-56
  1. Upgrade the current modules.
sudo fwconsole ma upgradeall
  1. Fix permissions
sudo fwconsole chown
  1. Reload
sudo fwconsole reload
  1. Reboot
sudo reboot
  1. Log back in and then switch to root.
sudo su -
  1. Download the versionupgrade module
fwconsole ma downloadinstall versionupgrade
  1. Fix permissions again
fwconsole chown
  1. Reload
fwconsole reload
  1. Run the version upgrade check and use fwconsole ma delete MODULENAME to remove any depreciated modules. If you do this, also make sure to fwconsole reload.
fwconsole versionupgrade --check
  1. It should be clean, so upgrade. If you have issues, before you revert your snapshot, download the freepbx16_upgrade.log file from /root in order to look at what went wrong.
fwconsole versionupgrade --upgrade | tee -a freepbx16_upgrade.log
  1. Fix any issues you may have. I had a broken restapi, likely left over from when this system was FreePBX 13.
fwconsole ma delete restapi
fwconsole reload
  1. Once everything looks good, reboot and see if it all comes up again normally.
reboot
3 Likes

Thank you for a proper post! Well done! What’s the difference between 15 and 16? Ours is running but yet not to be in use. We’re not there yet… It’s all!

That sure was a painful upgrade! Ha!
Thank you for sorting things out!

“campon” module was one that was broken for me.

I also had to touch /etc/asterisk/extconfig_custom.conf, an #included file that was missing, for Asterisk to start. This may be handled by fwconsole chown but I’m not sure; I created the conf file right after I saw that Asterisk wouldn’t start and saw the reason in the log.

2 Likes

This post was flagged by the community and is temporarily hidden.

Version Upgrade 15.0.19 resolve campon, as well as a restapi.

Installing version upgrade drops a gpg file in the cache folder owned by root. Which causes the subsequent check to fail because of files owned by root.

I’ve added that to my bug report. Out of all the things found with this search, that is the only one resolved by fwconsole chown, and the check works after that.

[[email protected] ~]$ sudo find /var/www/html -group root
/var/www/html/admin/assets/dynroute
/var/www/html/admin/assets/versionupgrade
/var/www/html/admin/assets/api
/var/www/html/admin/assets/filestore
/var/www/html/admin/assets/sangomaconnect
/var/www/html/admin/libraries/Composer/vendor/bin/doctrine-dbal
/var/www/html/admin/libraries/Composer/vendor/respect/validation/tests/fixtures/symbolic-link
/var/www/html/admin/modules/_cache/versionupgrade-15.0.19.tgz.gpg
/var/www/html/admin/cxpanel
[[email protected] ~]$ sudo find /var/www/html -user root
/var/www/html/admin/assets/dynroute
/var/www/html/admin/assets/versionupgrade
/var/www/html/admin/assets/api
/var/www/html/admin/assets/filestore
/var/www/html/admin/assets/sangomaconnect
/var/www/html/admin/libraries/Composer/vendor/bin/doctrine-dbal
/var/www/html/admin/libraries/Composer/vendor/respect/validation/tests/fixtures/symbolic-link
/var/www/html/admin/modules/_cache/versionupgrade-15.0.19.tgz.gpg
/var/www/html/admin/cxpanel
[[email protected] ~]$ sudo fwconsole chown
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 5 seconds
Setting specific permissions...
 67775 [============================]
Finished setting permissions
[[email protected] ~]$ sudo find /var/www/html -group root
/var/www/html/admin/assets/dynroute
/var/www/html/admin/assets/versionupgrade
/var/www/html/admin/assets/api
/var/www/html/admin/assets/filestore
/var/www/html/admin/assets/sangomaconnect
/var/www/html/admin/libraries/Composer/vendor/bin/doctrine-dbal
/var/www/html/admin/libraries/Composer/vendor/respect/validation/tests/fixtures/symbolic-link
/var/www/html/admin/cxpanel
[[email protected] ~]$ sudo find /var/www/html -user root
/var/www/html/admin/assets/dynroute
/var/www/html/admin/assets/versionupgrade
/var/www/html/admin/assets/api
/var/www/html/admin/assets/filestore
/var/www/html/admin/assets/sangomaconnect
/var/www/html/admin/libraries/Composer/vendor/bin/doctrine-dbal
/var/www/html/admin/libraries/Composer/vendor/respect/validation/tests/fixtures/symbolic-link
/var/www/html/admin/cxpanel

versionupgrade 15.0.19 enables way too much logging to console to be immediately helpful. The next upgrade I worked, failed. But the verbose spew scrolled everything beyond my console default scrollback cache.

I’ve updated the above upgrade command to use tee to create a log file.
For the curious, here if the output spew from 15.0.19 for a successful upgrade.
https://pastebin.freepbx.org/view/ff82d2a3