Upgrade Zabbix from 3.4 to 4.0 with Pacemaker/Corosync

Here are the instructions for upgrading Zabbix from 3.4 to 4.0 in a HA setup in a  Pacemaker and Corosync environment. In this particular setup there are 6 servers – depicted below

zabbix_upgrade

Two web front ends
Two Zabbix Servers
Two DB servers

 

Steps

Pre-requisite: As this was running in a VMware environment I snapshotted each VM before starting.


1) Backup DB in /var/local/backups ( this can be anywhere you have space)

# mysqldump -u root -p zabbix > /var/local/backups/zabbixdb.sql

2) Put ALL servers into pcs maintenance-mode

# pcs property set maintenance-mode=true

3) Backup WEB FRONT END files

# cp /etc/httpd/conf.d/zabbix.conf  /home/zabbix/backups/
# cp /etc/zabbix/zabbix_agentd.conf /home/zabbix/backups/
# cp -R /usr/share/zabbix/ /home/zabbix/backups/
# cp -R /usr/share/doc/zabbix-* /home/zabbix/backups/

4) Backup SERVER files


# cp /etc/zabbix/zabbix_server.conf /home/zabbix/backups/
# cp /etc/zabbix/zabbix_agentd.conf /home/zabbix/backups/
# cp -R /usr/share/doc/zabbix-* /home/zabbix/backups/

    
5) Stop Zabbix Servers 

# systemctl stop zabbix-server zabbix-agent

   
6) Stop Web Servers

# systemctl stop httpd zabbix-agent

6) Download to Web and Server nodes

# rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm 


    
7) Upgrade WEB Zabbix

# yum clean all
# yum upgrade zabbix-web-mysql zabbix-agent

8) Upgrade SERVER Zabbix

# yum clean all
# yum upgrade zabbix-server-mysql zabbix-agent

    
9) Start SERVER Zabbix

 # systemctl start zabbix-server zabbix-agent

    
10) Restart WEB Zabbix

# systemctl start httpd zabbix-agent

10) Check, then turn all servers off PCS maintenance-mode

#  pcs property set maintenance-mode=false