Question

Centreon 23.04 HA with manual failover

  • 31 May 2023
  • 1 reply
  • 87 views

Badge +1
Hello everyone, I have been using Centreon on premise on version 19.04.20 for several years. By taking the opportunity to install the new version of Centreon, I would like to upgrade my architecture to Centreon HA with manual failover.So I created two servers and followed this documentation: https://docs.centreon.com/fr/docs/installation/installation-of-centreon-ha-manual/centreon-ha-2-nodes-installation -manual-failover/I arrive at the following results:When I run the mysql status check script, I get the following output:On node1 (Master):/usr/share/centreon-ha/bin/mysql-check-status.shConnection MASTER Status 'node1' [OK]Connection SLAVE Status 'node2' [OK]Slave Thread Status [OK]Position Status [OK]On node2 (Slave):/usr/share/centreon-ha/bin/mysql-check-status.shConnection MASTER Status 'node1' [OK]Connection SLAVE Status 'node2' [OK]Slave Thread Status [OK]Position Status [OK]Everything seems OK at the moment.

 

Check of the VIP:On node1 (Master):/usr/share/centreon-ha/bin/move-mysql-vip-to-mysql-master.shThe VIP address is already at the right place. Nothing to do.On node2 (Slave):/usr/share/centreon-ha/bin/move-mysql-vip-to-mysql-master.shWe hope you have received from your local system administrator traditional instructions. Generally, they focus on these three elements:    #1) Respect the privacy of others.    #2) Think before using the keyboard.    #3) With great power comes great responsibility.sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass password prompt tool

 

Master change:On node1 (Master):/usr/share/centreon-ha/bin/set-centreon-master.sh node2Stopping centreon.service on node1…Unmounting VIP on node1...*** An error occured while removing the VIP from .Warning: Permanently added node1,<ip_node_1>' (ECDSA) to the list of known hosts.We hope you have received from your local system administrator traditional instructions. Generally, they focus on these three elements:    #1) Respect the privacy of others.    #2) Think before using the keyboard.    #3) With great power comes great responsibility.sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass password prompt tool

 

I manage to connect via SSH with the user "centreon" from node1 to node2 and vice versa using the SSH key without passphrase.
Also, this script is not present on my system: /usr/share/centreon-ha/bin/mysql-switch-slave-master.shThank you so much in advance for reading this post and for any help you can give me.  Regards.

 

PS : 

Sorry for the horrible layout of this post. Line breaks don't seem to work...

1 reply

Badge +1

Hello,

I added set -vx on the script /usr/share/centreon-ha/bin/set-centreon-master.sh

This is what i got :

+ [[ -n '' ]]
+ [[ node2 != n\o\d\e\1 ]]
+ [[ -n '' ]]
+ echo 'Stopping centreon.service on node1...'
Stopping centreon.service on node1...
+ [[ -n '' ]]
++ sudo -u centreon ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null node1 -- sudo systemctl stop centreon
' SERVICES_SHUTDOWN_OUTPUT='Warning: Permanently added '\''node1,192.168.1.10'\'' (ECDSA) to the list of known hosts.
+ SERVICES_SHUTDOWN_RC=0
+ [[ -n '' ]]
+ [[ 0 != 0 ]]
+ echo 'Unmounting VIP on node1...'
Unmounting VIP on node1...
+ [[ -n '' ]]
++ sudo -u centreon ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null node1 -- sudo ifdown 'enp4s3\:1'
+ VIP_SHUTDOWN_OUTPUT='Warning: Permanently added '\''node1,192.168.1.10'\'' (ECDSA) to the list of known hosts.

We hope you have received from your local system administratortraditional consignments. Generally, they focus on these three elements:#1) Respect the privacy of others.#2) Think before using the keyboard.#3) With great power comes great responsibility.sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure a password request tool askpass

 

 

Thank you for your help,

 

Regards.

Reply