Page tree
Skip to end of metadata
Go to start of metadata

In some situations, you may wish to make changes to the FreePBX HA Cluster to fix a problem, that may result in a service being restarted (eg, changing IP Addresses, adding or removing a dependancy). In this case, it is a good idea to set the cluster to maintenance mode before doing any changes. 

Maintenance Mode tells the cluster to go to a 'hands off' mode, and not start or stop any services until told otherwise. When maintanence mode is completed, the cluster does a sanity check of the current state of any services, and THEN stops or starts any that need it. 

Note that FreePBX HA DOES NOT EXPOSE THIS VIA THE WEB INTERFACE. It is critical that you remember to DISABLE maintenance mode when you've completed any repairs/changes you want to do.

[root@freepbx-a tmp]# pcs property set maintenance-mode=true
[root@freepbx-a tmp]# pcs status
Cluster name: freepbx-ha
Last updated: Mon Feb 17 05:07:15 2014
Last change: Mon Feb 17 05:07:14 2014 via cibadmin on freepbx-a
Stack: cman
Current DC: freepbx-a - partition with quorum
Version: 1.1.10-14.el6-368c726
2 Nodes configured
20 Resources configured

Online: [ freepbx-a freepbx-b ]
Full list of resources:
 spare_ip       (ocf::heartbeat:IPaddr2):       Started freepbx-a (unmanaged)
 floating_ip    (ocf::heartbeat:IPaddr2):       Started freepbx-a (unmanaged)
 Master/Slave Set: ms-asterisk [drbd_asterisk] (unmanaged)
     drbd_asterisk      (ocf::linbit:drbd):     Master freepbx-a (unmanaged)
     drbd_asterisk      (ocf::linbit:drbd):     Slave freepbx-b (unmanaged)
 Master/Slave Set: ms-mysql [drbd_mysql] (unmanaged)
     drbd_mysql (ocf::linbit:drbd):     Master freepbx-a (unmanaged)
     drbd_mysql (ocf::linbit:drbd):     Slave freepbx-b (unmanaged)
 Master/Slave Set: ms-httpd [drbd_httpd] (unmanaged)
     drbd_httpd (ocf::linbit:drbd):     Master freepbx-a (unmanaged)
     drbd_httpd (ocf::linbit:drbd):     Slave freepbx-b (unmanaged)
 Master/Slave Set: ms-spare [drbd_spare] (unmanaged)
     drbd_spare (ocf::linbit:drbd):     Master freepbx-a (unmanaged)
     drbd_spare (ocf::linbit:drbd):     Slave freepbx-b (unmanaged)
 spare_fs       (ocf::heartbeat:Filesystem):    Started freepbx-a (unmanaged)
 Resource Group: mysql
     mysql_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a (unmanaged)
     mysql_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a (unmanaged)
     mysql_service      (ocf::heartbeat:mysql): Started freepbx-a (unmanaged)
 Resource Group: asterisk
     asterisk_fs        (ocf::heartbeat:Filesystem):    Started freepbx-a (unmanaged)
     asterisk_ip        (ocf::heartbeat:IPaddr2):       Started freepbx-a (unmanaged)
     asterisk_service   (ocf::heartbeat:freepbx):       Started freepbx-a (unmanaged)
 Resource Group: httpd
     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a (unmanaged)
     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a (unmanaged)
     httpd_service      (ocf::heartbeat:apache):        Started freepbx-a (unmanaged)

While FreePBX HA is in Maintenance mode, the cluster will ignore any changes you make, will not restart services, and will not fail services to the other node.

When you're completed Maintenance mode, you need to reset the cluster back to a running state.

[root@freepbx-a tmp]# pcs property unset maintenance-mode
[root@freepbx-a tmp]# pcs status
Cluster name: freepbx-ha
Last updated: Mon Feb 17 05:10:21 2014
Last change: Mon Feb 17 05:10:17 2014 via cibadmin on freepbx-a
Stack: cman
Current DC: freepbx-a - partition with quorum
Version: 1.1.10-14.el6-368c726
2 Nodes configured
20 Resources configured

Online: [ freepbx-a freepbx-b ]
Full list of resources:
 spare_ip       (ocf::heartbeat:IPaddr2):       Started freepbx-a
 floating_ip    (ocf::heartbeat:IPaddr2):       Started freepbx-a
 Master/Slave Set: ms-asterisk [drbd_asterisk]
     Masters: [ freepbx-a ]
     Slaves: [ freepbx-b ]
 Master/Slave Set: ms-mysql [drbd_mysql]
     Masters: [ freepbx-a ]
     Slaves: [ freepbx-b ]
 Master/Slave Set: ms-httpd [drbd_httpd]
     Masters: [ freepbx-a ]
     Slaves: [ freepbx-b ]
 Master/Slave Set: ms-spare [drbd_spare]
     Masters: [ freepbx-a ]
     Slaves: [ freepbx-b ]
 spare_fs       (ocf::heartbeat:Filesystem):    Started freepbx-a
 Resource Group: mysql
     mysql_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a
     mysql_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a
     mysql_service      (ocf::heartbeat:mysql): Started freepbx-a
 Resource Group: asterisk
     asterisk_fs        (ocf::heartbeat:Filesystem):    Started freepbx-a
     asterisk_ip        (ocf::heartbeat:IPaddr2):       Started freepbx-a
     asterisk_service   (ocf::heartbeat:freepbx):       Started freepbx-a
 Resource Group: httpd
     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a
     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a
     httpd_service      (ocf::heartbeat:apache):        Started freepbx-a
  • No labels