[Pacemaker] Complicated dependences between resources and nodes

Phil Frost phil at macprofessionals.com
Sun Jul 29 12:51:09 UTC 2012


On 07/28/2012 06:46 AM, Antonis Christofides wrote:
> Hi,
>
> short questions:
>
> Is it possible to dictate that resource R1 runs on a different node 
> than resource R2?

Yes.

http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/ch06s04s02.html

> Is it possible when moving R1 from node N1 to N2 to first start it in 
> N2 and only after it starts to stop it in N1? Is it possible to run R1 
> at the same time in all nodes, and restart it in all nodes whenever R2 
> is started/moved? How about running R1 in all nodes except the node in 
> which R2 is running?

Maybe, yes, yes. Have you considered clones, coupled with order and 
colocation constraints?

http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-clone.html

> Is it possible to achieve the
> above order, and how? I.e. a dependence that service A stops in one node
> only after service B starts elsewhere.

If you want to start another service that is using your DRBD device 
before the other has stopped, then you require dual-primary mode, since 
for a moment, both will be primary. At this point, you might as well 
have an active/active cluster where both nodes are primary all the time.

If you just want to decrease your downtime window, maybe you can 
postpone the move of the DRBD primary from one node to the other (during 
which there is necessarily some downtime) by using advisory ordering. 
For mandatory orderings, "If the |first| resource is (re)started while 
the |then| resource is running, the |then| resource will be stopped and 
restarted.". Not true for advisory orderings.

http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-ordering.html
http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/ch06s03s02.html

The idea would be that you order your DRBD promotion after starting your 
resource that changes the routing, with an advisory rule. Not sure if 
that works or not, but something to test.





More information about the Pacemaker mailing list