[Pacemaker] stopping resource stops others in colocation / order sets
Jake Smith
jsmith at argotec.com
Thu Jun 14 23:47:12 CEST 2012
I believe it's two things.
Think of collocation as "with" or on top of.
So it should be resC on top of resB on top of DRBD:master. I think of collocation as being written in the reverse order of "order" statement. That's why resources in groups start in the order they are written and collocate in reverse from written order.
Second and this may or may not be right (travelling so I can't check right now). It could also be creating a resource group inside the collocation statement. This is because it will group like action types of resources if there are at least two different action types of resources AND at least two of one action type.
This would be causing the statement above to collocate resB on top of resC. From above... Groups collocate in reverse of the way they're written.
To check: crm configure show xml. This will output the actual order of the collocate statement which may be like what I wrote (first two reversed).
HTH
Jake
Sent from my HTC
----- Reply message -----
From: "Phil Frost" <phil at macprofessionals.com>
To: <pacemaker at oss.clusterlabs.org>
Subject: [Pacemaker] stopping resource stops others in colocation / order sets
Date: Thu, Jun 14, 2012 2:23 pm
I'm sure this is a typical novice question, but I've been dancing around
this problem for a day without any real progress, so could use some more
experienced eyes. I'm setting up what must be a pretty normal NFS / DRBD
/ LVM, 2 node, active / passive cluster. Everything works, mostly, but
it doesn't quite behave as I'd expect, I'm not sure why, and not sure
how to find out.
Start with the somewhat-contrived, but working test configuration which
represents a DRBD device and some services (maybe a FS mount and Apache)
that use it:
primitive drbd_nfsexports ocf:linbit:drbd \
params drbd_resource="nfsexports" \
op monitor interval="10s" role="Master" \
op monitor interval="20s" role="Slave" \
op start interval="0" timeout="240s" \
op stop interval="0" timeout="100s"
primitive resB ocf:pacemaker:ping \
params host_list="127.0.0.1" \
op start interval="0" timeout="60s" \
meta target-role="Started"
primitive resC ocf:pacemaker:ping \
params host_list="127.0.0.1" \
op start interval="0" timeout="60s" \
meta target-role="Started"
ms drbd_nfsexports_ms drbd_nfsexports \
meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Master"
colocation colo inf: drbd_nfsexports_ms:Master resB resC
order ord inf: drbd_nfsexports_ms:promote resB resC
property $id="cib-bootstrap-options" \
no-quorum-policy="ignore" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
stonith-enabled="false" \
last-lrm-refresh="1339694844"
If resC is stopped
resource stop resC
then drbd_nfsexports is demoted, and resB and resC will stop. Why is
that? I'd expect that resC, being listed last in both the colocation and
order constraints, could be stopped without affecting the other
resources. I've also found that if I construct a similar scenario with
another ping as resA instead of the DRBD resource, it behaves as I'd expect.
Perhaps interestingly, if I delete the order constraint:
configure delete ord
the the DRBD resource says demoted, but resB starts. Maybe this is the
issue to examine, because I can see how with the order constraint added,
any demotion of the DRBD resource would lead to all the services being
stopped.
So, what If I delete the constraint "colo", and replace it with what I
understand to be equivalent (as I understand it, the order of the
resources is reverse when there are only two. Confusing, but correct?):
configure delete colo
configure colocation colo1 inf: resC resB
configure colocation colo2 inf: resB drbd_nfsexports_ms:Master
Now just resC is stopped. Try making just resB stopped:
resource start resC
resource stop resB
now resC and resB are stopped, but I still have a DRBD master as I'd
expect. Re-add the order constraint:
configure order ord inf: drbd_nfsexports_ms:promote resB resC
things remain unchanged.
What am I not understanding?
_______________________________________________
Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20120614/08bc5797/attachment-0001.html>
More information about the Pacemaker
mailing list