How can I negatively colocate resources in a Pacemaker cluster so that one doesn't depend on another's placement?
Issue
- I want to make sure that no two resources in a set of resources ever run on the same node. Additionally, I don't want to require that any one resource be placed before any other resource. How can I achieve this?
- I have a set of three resources (
rsc_A
,rsc_B
,rsc_C
), and they should always run on separate nodes. If only two nodes are available, then one of the resources should stop and the other two should remain running in place. I configured the resources into a colocation constraint set withscore=-INFINITY
as shown below:
set rsc_a rsc_b rsc_c setoptions score=-INFINITY
But when I take down node1
where rsc_a
is running, rsc_c
stops on node3
and rsc_a
starts in its place.
Performing requested modifications
+ Taking node node1 offline
...
Transition Summary:
* Start rsc_a ( node3 )
* Stop rsc_c ( node3 ) due to node availability
Environment
- Red Hat Enterprise Linux 7 (with the High Availability Add-on)
- Red Hat Enterprise Linux 8 (with the High Availability Add-on)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.