[ClusterLabs] Using "mandatory" startup order but avoiding depending clones from restart after member of parent clone fails

Alejandro Comisario alejandro at nubeliu.com
Mon Feb 6 23:25:53 UTC 2017

guys, really happy to post my first doubt.

i'm kinda having an "conceptual" issue that's bringing me, lots of issues
i need to ensure that order of starting resources are mandatory but
that is causing me a huge issue, that is if just one of the members of
a clone goes down and up (but not all members) all resources depending
on it are restarted (wich is bad), my workaround is to set order as
advisory, but that doesnt asure strict order startup.

eg. clone_b runs on servers_B, and depends on clone_a that runs on servers_A.

I'll put an example on how i have everything defined between this two clones.

### clone_A running on servers A (location rule)
primitive p_mysql mysql-wss \
op monitor timeout=55 interval=60 enabled=true on-fail=restart \
op start timeout=475 interval=0 on-fail=restart \
op stop timeout=175 interval=0 \
params socket="/var/run/mysqld/mysqld.sock"
pid="/var/run/mysqld/mysqld.pid" test_passwd="XXX" test_user=root \
meta is-managed=true

clone p_mysql-clone p_mysql \
meta target-role=Started interleave=false globally-unique=false

location mysql_location p_mysql-clone resource-discovery=never \
rule -inf: galera ne 1

### clone_B running on servers B (location rule)
primitive p_keystone apache \
params configfile="/etc/apache2/apache2.conf" \
op monitor on-fail=restart interval=60s timeout=60s \
op start on-fail=restart interval=0 \
meta target-role=Started migration-threshold=2 failure-timeout=60s

clone p_keystone-clone p_keystone \
meta target-role=Started interleave=false globally-unique=false

location keystone_location p_keystone-clone resource-discovery=never \
rule -inf: keystone ne 1

order p_clone-mysql-before-p_keystone INF: p_mysql-clone p_keystone-clone:start

Again just to make my point, if p_mysql-clone looses even one member
of the clone, ONLY when that member gets back, all members of
p_keystone-clone gets restarted, and thats NOT what i need, so if i
change the order from mandatory to advisory, i get what i want
regarding behaviour of what happens when instances of the clone comes
and goes, but i loos the strictness of the startup order, which is
critial for me.

How can i fix this problem ?
.. can i ?

Alejandro Comisario

More information about the Users mailing list