I am setting up a ubuntu linux HA cluster. I referred to (https://ubuntu.com/server/docs/ubuntu-ha-introduction).
I am also reading through the clusterlabs documentation at https://clusterlabs.org/pacemaker/doc/deprecated/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#idm46061171183360.
My cluster has two nodes viz. node_A and node_B.
I need to have three resources that I call "master", "companion" , and "keepaway"
The resources "master" and "companion" always need to run on same node.
I intend to bind them by a "colocation constraint" such as follows
<rsc_colocation id="colocatec2m" rsc="companion" with-rsc="master" score="INFINITY"/>
In normal times the resource "keepaway" needs to run on a node that is distinct from the node where "master" and "companion" are running.
So for example if "master" and "companion" are running on node_A then "keepaway" needs to run on node_B and vice_versa.
However I do not want a mandatory reverse co-location constraint with a negative score (-INFINITY) That is because I want "keepaway" to be able to run on same node as "master" and "companion" only in case the other node is NOT available
So a few specific questions
Q1) Can the desired result be accomplished by an "advisory placement" constraint specified for "keepaway" with a negative number to keep it away is possible ... but not mandatory
<rsc_colocation id="awayifpossible" rsc="keepaway" with-rsc="master" score="-500"/>
Q2) If I had only above two constraints one for mandatory colocation and one advisory keep away, Does score number in the advisory constraint have any bearing on behavior (can it be any number other than infinity )
Q3) What do I have to do to ensure that "keepaway" moves out to the other node as soon as other node becomes re-available after a failure ( do not want it to be sticky)
Thanks for your help
Yogesh
0 Answers