Post-Upgrade Steps — High Availability (to v2.3.4)
Post-upgrade steps for an HA deployment.
Note: These steps follow an upgrade to HEAL v2.3.4; after an upgrade from HEAL v2.3.4 to v2.4.1, follow Upgrading to HEAL v2.4.1 instead.
High Availability (HA)#
Upgrade from HEAL v2.3.2 to HEAL v2.3.4#
Ensure the below consul key value is Yes.
service/opensearch/zoning/enabled
For example:
service/opensearch/zoning/enabled yes
Enable Master-Master replication by executing below command:
./startServices.sh PERCONA
Ensure the replication is functioning by below steps:
a. Login to mysql, by executing the command below:
mysql -h <Percona IP> -u <username> -p'<Percona password>' -P <Percona Port> --ssl-
mode=disabled
For example:
mysql -h 192.0.2.10 -u dbadmin -p'<password>' -P 3303 --ssl-mode=disabled
b. Execute below to display replica status: show replica status\G;
Slave_IO_Running: Yes, indicates that the I/O thread for the slave is running. This thread is responsible for reading events from the master's binary log and storing them in the slave's relay log. Slave_SQL_Running: Yes, means that the SQL thread for the slave is running. This thread is responsible for reading events from the slave's relay log and executing them. Seconds_Behind_Master: 0 shows that the slave is fully synced with the master. If this value is greater than 0, it means the slave is lagging the master by that many seconds. If the Slave_IO_Running or Slave_SQL_Running values are No, it means that replication is not currently functioning as it should.
If a percona replication error is displayed, then refer to the HEAL Installation Issues document.
For example: Last_IO_Error: Got fatal error 1236 from source when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space; the first event '' at 4, the last event read from '/var/lib/mysql/mysql-bin.000085' at 126, the last byte read from '/var/lib/mysql/mysql-bin.000085' at 126.'s
Once percona is functioning, restart the services:
Option 1: Restart all services.
a. Ensure a maintenance window (downtime).
b. Navigate to a1home and stop all HEAL services using the below script:
./stopServices.sh -f ALL
c. Navigate to the RabbitMQ data directory on each RabbitMQ server
cd /a1home/Appsone_Service/data/rabbitmq
d. Delete the mnesia directory to clear cluster state, refer to Deploy the safe_delete.sh Script.
e. Start all services using the below script:
./startServices.sh ALL
Option 2: Restart only few modules (RabbitMQ, OpenSearch, and Redis).
a. Ensure a maintenance window (downtime).
b. Stop the RabbitMQ, OpenSearch, and Redis modules using the below script:
nomad stop <HEAL Module>
For example:
nomad stop rabbitMQ
c. Navigate to the RabbitMQ data directory on each RabbitMQ server
cd /a1home/Appsone_Service/data/rabbitmq
d. Delete the mnesia directory to clear cluster state, refer to Deploy the safe_delete.sh Script.
e. Start all the 4 modules (RabbitMQ, OpenSearch, and Redis) using the below script:
./startServices.sh default
- Refresh microservices: Restart individual HEAL microservices as needed to update the latest images/configuration:
a. Stop the microservice:
nomad stop <HEAL Module>
b. Start microservice:
nomad start <HEAL Module>
- Cron expressions will be added through upgrade installer and by default it will be commented on all the nodes.
a. To enable HA switchover script, uncomment the cron by following below steps:
i. Access the cron file by following command: crontab -e
ii. Default execution command:
#*/5 * * * * cd /opt/Installer/Heal/Appsone_Service/utilities; bash performSwitchOver.sh >
/dev/null 2>&1
iii. Uncomment execution command: */5 * * * * cd /opt/Installer/Heal/Appsone_Service/utilities; bash performSwitchOver.sh > /dev/null 2>&1
Note: Default cron will be set for every 5min. If any custom time is required, update the specific cron expression respectively. b. If Data receiver module is not added as a part of HA switchover.sh file due to its custom data receivers running at end user environment. To enable it, follow the below steps: i. Run below command to cron expression: crontab -e
Expected output:
*/5 * * * * cd /opt/Installer/Heal/Appsone_Service/utilities; bash performSwitchOver.sh >
/dev/null 2>&1
ii. Navigate to the above path obtained in cron expression:
cd /opt/Installer/Heal/Appsone_Service/utilities
iii. Open the below file, by executing the following command:
vi switchover.sh
iv. Add the respective PRIMARY & SECONDARY data receiver nomad files names under their section.
For example:
PRIMARY:
primaryNomadFileList=( trinodb-primary.nomad ui2x-primary.nomad 203.0.113.14_UISERVICE_PRIMARY_1.nomad 192.0.2.15_DATA_RECEIVER_PRIMARY_1.nomad 192.0.2.15_DATA_RECEIVER_PRIMARY_2.nomad) SECONDARY:
secondaryNomadFileList=( trinodb-secondary.nomad ui2x-secondary.nomad 203.0.113.14_UISERVICE_SECONDARY_1.nomad 192.0.2.15_DATA_RECEIVER_SECONDARY_1.nomad 192.0.2.15_DATA_RECEIVER_SECONDARY_2.nomad)
Note: Ensure the PRIMARY and SECONDARY names are present in respective sections in same order.
v. Ensure the updated switchover.sh file is updated on all the servers.
Note: For any modules not used in the HA setup, remove the corresponding Nomad entries from both the primary and secondary job lists in switchover.sh on the primary server. After updating the file, copy it to all other servers to ensure synchronization.
Upgrade from HEAL v2.3.3 to v2.3.4#
Use the following steps to upgrade HEAL from v2.3.3 to v2.3.4:
Ensure the below consul key value is Yes.
service/opensearch/zoning/enabled
For example:
service/opensearch/zoning/enabled yes
Restart the services.
Option 1: Restart all services.
a. Ensure a maintenance window (downtime).
b. Navigate to a1home and follow below steps:
i. Navigate to a1home and stop all HEAL services using the below script:
./stopServices.sh -f ALL
ii. Start all services using the below script:
./startServices.sh ALL
Option 2: Restart only few modules (RabbitMQ, Percona, OpenSearch, and Redis).
a. Ensure a maintenance window (downtime).
b. Stop the RabbitMQ, Percona, OpenSearch, and Redis modules using the below script:
nomad stop <HEAL Module>
For example:
nomad stop Percona
c. Start all the 4 modules (RabbitMQ, Percona, OpenSearch, and Redis) using the below script:
./startServices.sh default
- Refresh microservices: Restart individual HEAL microservices as needed to update the latest images/configuration:
a. Stop the microservice:
nomad stop <HEAL Module>
b. Start microservice:
nomad start <HEAL Module>