[Pacemaker] Order Constraint for: stop rscA only when rscB is running ?

Andreas Kurz andreas.kurz at linbit.com
Thu Oct 2 08:23:31 UTC 2008


Hi,

I have a Heartbeat 2.1.3 two-node cluster and I wonder if there is a way to 
create constraints that work like that:

* Two resources (rscA and rscB) of class "heartbeat" that should run together 
on one node .... simple advisory colocation constraint

<rsc_colocation id="rscA-colocated-with-rscB" 
	from="rscA" to="rscB" 
	score="1" symmetrical="true"/>

* When doing maintenance on one node I put the node into standby mode and want 
rscA only stop and migrate away if rscB is already up and running on the 
other node and vice versa because  there must always run at least one of 
these resources in the cluster.

I added two order_constraints and tested it with ptest on an adapted live cib  
but they seem to produce a loop:

<rsc_order id="stop-rscA-only-after-rscB-start" 
	from="service_rscA" action="stop" 
	type="after" 
	to="service_rscB" to_action="start" 
	symmetrical="false" score="0"/>

<rsc_order id="stop-rscB-only-after-rscA-start" 
	from="service_rscB" action="stop" 
	type="after" 
	to="service_rscA" to_action="start" 
	symmetrical="false" score="0"/>

Is there a way to get the requested behavior or is a manual resource after 
resource migration the only way to achieve this?

Regards,
Andreas

-- 
: Andreas Kurz					 
: LINBIT | Your Way to High Availability
: Tel +43-1-8178292-64, Fax +43-1-8178292-82
:
: http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.

This e-mail is solely for use by the intended recipient(s). Information
contained in this e-mail and its attachments may be confidential,
privileged or copyrighted. If you are not the intended recipient you are
hereby formally notified that any use, copying, disclosure or
distribution of the contents of this e-mail, in whole or in part, is
prohibited. Also please notify immediately the sender by return e-mail
and delete this e-mail from your system. Thank you for your co-operation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20081002/fb5abc0b/attachment-0001.sig>


More information about the Pacemaker mailing list