Process for upgrading a Multi-Master Cluster

nocstaff

New Member
Sep 22, 2020
17
0
1
49
I am currently on FusionPBX version 5.3.9. Is this the proper upgrade method:

Pre-Upgrade Checklist
  • Backup Everything: Before starting, perform a full backup of the FusionPBX directory (/var/www/fusionpbx) and the PostgreSQL database on at least one primary node.
  • Maintenance Window: Announce a maintenance window, as restarting services like FreeSWITCH will drop active calls.
  • Replication Health: Ensure your multi-master replication is in a healthy state. If nodes are currently out of sync, resolve those issues before attempting an upgrade.

Upgrade Procedure

1. Update Source Code on All Nodes

On every node in the cluster, update the FusionPBX source code from the command line:
  1. Navigate to the FusionPBX directory: cd /var/www/fusionpbx.
  2. Pull the latest code: git pull.
  3. Reset permissions: chown -R www-data:www-data * (assuming your web server user is www-data).

2. Run Schema and App Upgrades (Single Node Only)
Unlike the source code update, database schema changes should only be run on ONE node to allow the changes to replicate naturally through your multi-master setup.
  1. Log in to the GUI of your primary node.
  2. Navigate to Advanced > Upgrade.
  3. Select Schema, Data Types, and App Defaults.
  4. Click Execute.
  5. Note: Check for any "red bar" errors in the GUI, which might indicate a GIT conflict or a database lock.

3. Update FreeSWITCH Scripts
On every node, ensure the FreeSWITCH scripts are updated to match the new code:
  1. From the GUI (Advanced > Upgrade), check the App Defaults box (if not already done in step 2) and execute.
  2. Alternatively, manually copy the scripts from the FusionPBX app directory to the FreeSWITCH scripts folder to ensure consistency across the cluster.

4. Apply Permissions and Restart Services
On every node, finalize the upgrade:
  1. Re-apply system permissions: chown -Rv www-data:www-data /usr/share/freeswitch/.
  2. Restart the FreeSWITCH service: systemctl restart freeswitch.
  3. If you have auxiliary services like event_guard or email_queue, restart them as well.

5. Post-Upgrade Synchronization
  1. Menu Restore: If the menu layout has changed, go to Advanced > Menu Manager on one node and click Restore Default.
  2. Flush Cache: Navigate to Status > SIP Status and click Flush Cache on all nodes to clear old configuration data from memory.