Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Pacemaker

Specifying a location rule with a resource:role

 

 

Linux-HA pacemaker RSS feed   Index | Next | Previous | View Threaded


jay.janssen at percona

Jul 24, 2012, 12:03 PM

Post #1 of 2 (296 views)
Permalink
Specifying a location rule with a resource:role

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 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
YahooIM: perconajayj
Calendar: http://tungle.me/jayjanssen

Percona Live in NYC Oct 1-2nd: http://www.percona.com/live/nyc-2012/


andreas at hastexo

Jul 25, 2012, 1:39 AM

Post #2 of 2 (282 views)
Permalink
Re: Specifying a location rule with a resource:role [In reply to]

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 <mailto:jay.janssen [at] percona>
> 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
> 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
>
Attachments: signature.asc (0.22 KB)

Linux-HA pacemaker RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.