[Pacemaker] Specifying a location rule with a resource:role

Andreas Kurz andreas at hastexo.com
Wed Jul 25 08:39:09 UTC 2012


On 07/24/2012 09:03 PM, Jay Janssen wrote:
> Hi all,
>   Simple crm configure syntax question (I think).  I'm trying to make a
> given role (a 'Master' in a master/slave set) from being location on a
> given node.  However, the "obvious" syntax (at least in my mind) doesn't
> work:
> 
> location avoid_being_the_master ms_MySQL:Master -1000: my_node
> location never_be_the_master ms_MySQL:Master -inf: my_node

This notation is a special shortcut and does not allow setting the role
... try:

location avoid_being_the_master ms_MySQL \
          rule $role=Master -1000: #uname eq my_node
location never_be_the_master ms_MySQL \
          rule $role=Master -inf: #uname eq my_node

Regards,
Andreas

-- 
Need help with Pacemaker?
http://www.hastexo.com/now

> 
>   This man page tells me I'm
> close: http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ch06s07.html ,
> I suspect it's the :Master rule that is screwing me up.  How can I
> specify the Master role?  The following colocation rule works fine:
> 
> colocation writer_vip_on_master inf: writer_vip ms_MySQL:Master
> 
> Jay Janssen, MySQL Consultant, Percona Inc.
> Telephone: +1 888 401 3401 ext 563 (US/Eastern)
> Emergency:+1 888 401 3401 ext 911
> Skype:percona.jayj  
> GTalk/MSN: jay.janssen at percona.com <mailto:jay.janssen at percona.com>
> YahooIM:perconajayj
> Calendar: http://tungle.me/jayjanssen
> 
> Percona Live in NYC Oct 1-2nd: http://www.percona.com/live/nyc-2012/
> 
> 
> 
> _______________________________________________
> 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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 222 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120725/833c58b4/attachment-0004.sig>


More information about the Pacemaker mailing list