<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000066">
Sent: Mon Nov 28 2011 16:10:01 GMT-0700 (MST)<br>
From: Patrick H. <a class="moz-txt-link-rfc2396E" href="mailto:pacemaker@feystorm.net"><pacemaker@feystorm.net></a><br>
To: The Pacemaker cluster resource manager
<a class="moz-txt-link-rfc2396E" href="mailto:pacemaker@oss.clusterlabs.org"><pacemaker@oss.clusterlabs.org></a> Andreas Kurz
<a class="moz-txt-link-rfc2396E" href="mailto:andreas@hastexo.com"><andreas@hastexo.com></a><br>
Subject: Re: [Pacemaker] colocation issue with master-slave
resources
<blockquote cite="mid:4ED414C9.30203@feystorm.net" type="cite">Sent:
Mon Nov 28 2011 15:27:10 GMT-0700 (MST)
<br>
From: Andrew Beekhof <a class="moz-txt-link-rfc2396E" href="mailto:andrew@beekhof.net"><andrew@beekhof.net></a>
<br>
To: The Pacemaker cluster resource manager
<a class="moz-txt-link-rfc2396E" href="mailto:pacemaker@oss.clusterlabs.org"><pacemaker@oss.clusterlabs.org></a> Andreas Kurz
<a class="moz-txt-link-rfc2396E" href="mailto:andreas@hastexo.com"><andreas@hastexo.com></a>
<br>
Subject: Re: [Pacemaker] colocation issue with master-slave
resources
<br>
<blockquote type="cite">Perhaps try and ordering constraint, I may
have also fixed something
<br>
in this area for 1.1.6 so an upgrade might also help
<br>
<br>
On Tue, Nov 29, 2011 at 1:38 AM, Patrick
H.<a class="moz-txt-link-rfc2396E" href="mailto:pacemaker@feystorm.net"><pacemaker@feystorm.net></a> wrote:
<br>
<blockquote type="cite">Sent: Mon Nov 28 2011 01:31:22 GMT-0700
(MST)
<br>
From: Andreas Kurz<a class="moz-txt-link-rfc2396E" href="mailto:andreas@hastexo.com"><andreas@hastexo.com></a>
<br>
To: The Pacemaker cluster resource
manager<a class="moz-txt-link-rfc2396E" href="mailto:pacemaker@oss.clusterlabs.org"><pacemaker@oss.clusterlabs.org></a>
<br>
Subject: Re: [Pacemaker] colocation issue with master-slave
resources
<br>
<br>
On 11/28/2011 04:51 AM, Patrick H. wrote:
<br>
<br>
I'm trying to setup a colocation rule so that a couple of
master-slave
<br>
resources cant be master unless another resource is running on
the same
<br>
node, and am getting the exact opposite of what I want. The
master-slave
<br>
resources are getting promoted to master on the node which
this other
<br>
resource isnt running on.
<br>
<br>
In the below example, 'stateful1:Master' and
'stateful2:Master' should
<br>
be on the same node 'dummy' is on. It works just fine if I
change the
<br>
colocation around so that 'dummy' depends on the stateful
resources
<br>
being master, but I dont want that. I want dummy to be able to
run no
<br>
matter what, but the stateful resources not be able to become
master
<br>
without dummy.
<br>
<br>
<br>
# crm status
<br>
============
<br>
Last updated: Mon Nov 28 03:47:04 2011
<br>
Stack: cman
<br>
Current DC: devlvs03 - partition with quorum
<br>
Version: 1.1.5-5.el6-01e86afaaa6d4a8c4836f68df80ababd6ca3902f
<br>
2 Nodes configured, 2 expected votes
<br>
6 Resources configured.
<br>
============
<br>
<br>
Online: [ devlvs04 devlvs03 ]
<br>
<br>
dummy (ocf::pacemaker:Dummy): Started devlvs03
<br>
Master/Slave Set: stateful1-ms [stateful1]
<br>
Masters: [ devlvs04 ]
<br>
Slaves: [ devlvs03 ]
<br>
Master/Slave Set: stateful2-ms [stateful2]
<br>
Masters: [ devlvs04 ]
<br>
Slaves: [ devlvs03 ]
<br>
<br>
<br>
# crm configure show
<br>
node devlvs03 \
<br>
attributes standby="off"
<br>
node devlvs04 \
<br>
attributes standby="off"
<br>
primitive dummy ocf:pacemaker:Dummy \
<br>
meta target-role="Started"
<br>
primitive stateful1 ocf:pacemaker:Stateful
<br>
primitive stateful2 ocf:pacemaker:Stateful
<br>
ms stateful1-ms stateful1
<br>
ms stateful2-ms stateful2
<br>
colocation stateful1-colocation inf: stateful1-ms:Master dummy
<br>
colocation stateful2-colocation inf: stateful2-ms:Master dummy
<br>
<br>
use dummy:Started ... default is to use same role as left
resource, and
<br>
Dummy will never be in role Master ...
<br>
<br>
Regards,
<br>
Andreas
<br>
<br>
Tried that too (just not the configuration at the time I sent
the email), no
<br>
effect.
<br>
</blockquote>
</blockquote>
<br>
Upgraded to 1.1.6 and put in an ordering constraint, still no joy.
<br>
<br>
# crm status
<br>
============
<br>
Last updated: Mon Nov 28 23:09:37 2011
<br>
Last change: Mon Nov 28 23:08:34 2011 via cibadmin on devlvs03
<br>
Stack: cman
<br>
Current DC: devlvs03 - partition with quorum
<br>
Version: 1.1.6-1.el6-b379478e0a66af52708f56d0302f50b6f13322bd
<br>
2 Nodes configured, 2 expected votes
<br>
5 Resources configured.
<br>
============
<br>
<br>
Online: [ devlvs04 devlvs03 ]
<br>
<br>
dummy (ocf::pacemaker:Dummy): Started devlvs03
<br>
Master/Slave Set: stateful1-ms [stateful1]
<br>
Masters: [ devlvs04 ]
<br>
Slaves: [ devlvs03 ]
<br>
Master/Slave Set: stateful2-ms [stateful2]
<br>
Masters: [ devlvs04 ]
<br>
Slaves: [ devlvs03 ]
<br>
<br>
<br>
# crm configure show
<br>
node devlvs03 \
<br>
attributes standby="off"
<br>
node devlvs04 \
<br>
attributes standby="off"
<br>
primitive dummy ocf:pacemaker:Dummy \
<br>
meta target-role="Started"
<br>
primitive stateful1 ocf:pacemaker:Stateful
<br>
primitive stateful2 ocf:pacemaker:Stateful
<br>
ms stateful1-ms stateful1
<br>
ms stateful2-ms stateful2
<br>
colocation stateful1-colocation inf: stateful1-ms:Master
dummy:Started
<br>
colocation stateful2-colocation inf: stateful2-ms:Master
dummy:Started
<br>
order stateful1-start inf: dummy:start stateful1-ms:promote
<br>
order stateful2-start inf: dummy:start stateful2-ms:promote
<br>
property $id="cib-bootstrap-options" \
<br>
dc-version="1.1.6-1.el6-b379478e0a66af52708f56d0302f50b6f13322bd"
\
<br>
cluster-infrastructure="cman" \
<br>
expected-quorum-votes="2" \
<br>
stonith-enabled="false" \
<br>
no-quorum-policy="ignore" \
<br>
last-lrm-refresh="1322450542"
<br>
</blockquote>
Well there is a really ugly workaround that solves this. If I
convert 'dummy' to a master-slave resource, and just have the slave
do nothing. It does obey the colocation rule when I tell it to keep
the Master roles on the same box.<br>
</body>
</html>