Forum

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/13/d467848118/htdocs/templates/cleanout/vertex/responsive/responsive_mobile_menu.php on line 158
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Trigger when secondary/slave node 2 be primary/master? How detect this? 3 years 8 months ago #2394

  • Varga B.
  • Varga B.'s Avatar Topic Author
  • Offline
  • Posts: 10
Hi!

Info: xcp-ng + ha-lizard all 3 node, all 3 node identical hardware

node1: active, master
node2: passive, slave
node3: passive, slave and disabled after fully sync

All 3 node possible to turn on and turn off by an Ethernet relay switch, with scripting.

My plan: if node2 be active and master, it means something happens with node1, I want call a script what is turn on node3 automatically using Ethernet relay command and powered on.

How can detect this?

My idea: run every minute a cron script on node2 with a command, I don't know what, like a status or something, and if I see node2 is active, I exec the node3 turn on script.

Any better idea for that?

Thank you.

Please Log in or Create an account to join the conversation.

Trigger when secondary/slave node 2 be primary/master? How detect this? 3 years 7 months ago #2423

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 727
The default fencing method in a 2 node cluster can be switched to a custom script (see documentation on how to do this). In your case, if a node fails, your custom fencing script would be called which can then handle any tasks needed (such as powering on your third host)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1