[Pacemaker] Specifying stop and demote order
Stefan Foerster
cite+pacemaker at incertum.net
Wed Jun 9 05:25:22 UTC 2010
Hello world,
I have a number of primitives and a master/slave resource which need
to be started in a given order. At first I was thinking about using a
"group", but as things go with groups, seemingly independent resources
might start to work if one of the group's resources fails (you cant
specify that resources are independent of each other), and AFAIK you
can't have groups in other groups (I might be wrong on both counts -
if so, please let me know).
Now, what I've come up with is this:
<rsc_order id="order-DRBD_IP_FS_MySQL">
<resource_set id="order-set-DRBD" action="promote">
<resource_ref id="ms-DRBD_shared"/>
</resource_set>
<resource_set id="order-set-FS-and-IP" sequential="false" action="start">
<resource_ref id="prim-FS_shared"/>
<resource_ref id="prim-Failover_IP"/>
</resource_set>
<resource_set id="order-set-mysql" sequential="false" action="start">
<resource_ref id="prim-MySQL_db_test"/>
<resource_ref id="prim-MySQL_db_fax"/>
<resource_ref id="prim-MySQL_db_syslog"/>
<resource_ref id="prim-MySQL_db_nagios"/>
<resource_ref id="prim-MySQL_db_wiki"/>
</resource_set>
</rsc_order>
Obviously, this works very well for starting the resources - and does
absolutely nothing for stopping them (e.g. if you migrate them to
another node).
So, my question is - I guess - twofold:
1. Is there any way to specify the above ordering rules in a way that
they also apply to a "stop" and a "demote" action?
2. If not, can I simply reverse the above orders and negate the
actions? What about stopping the master/slave set, will that be
covered by a "demote"?
I was thinking about something like:
<rsc_order id="order-DRBD_IP_FS_MySQL-shutdown">
<resource_set id="order-set-mysql" sequential="false" action="stop">
<resource_ref id="prim-MySQL_db_test"/>
<resource_ref id="prim-MySQL_db_fax"/>
<resource_ref id="prim-MySQL_db_syslog"/>
<resource_ref id="prim-MySQL_db_nagios"/>
<resource_ref id="prim-MySQL_db_wiki"/>
</resource_set>
<resource_set id="order-set-FS-and-IP" sequential="false" action="stop">
<resource_ref id="prim-FS_shared"/>
<resource_ref id="prim-Failover_IP"/>
</resource_set>
<resource_set id="order-set-DRBD" action="demote">
<resource_ref id="ms-DRBD_shared"/>
</resource_set>
</rsc_order>
Can this be accomplished in an easier way? Is it sufficient?
Cheers
Stefan
P.S: It seems I left out any scores - should I re-add them?
More information about the Pacemaker
mailing list