[Pacemaker] need cluster-wide variables

Andrew Beekhof andrew at beekhof.net
Mon Jan 2 18:40:18 EST 2012


On Wed, Dec 21, 2011 at 6:01 PM, Nirmala S <nirmalas at huawei.com> wrote:
> Hi,
>
>
>
> This is a followup on earlier thread
> (http://www.gossamer-threads.com/lists/linuxha/pacemaker/76705).
>
>
>
> My situation is somewhat similar. I need to a cluster which contains 3 kinds
> of nodes – master, preferred slave, slave. Preferred slave is an entity that
> becomes the master in case of switchover/failover.  Master is the master for
> pref_slave and pref_slave is master for other slaves. The master election is
> easy – it is done by crm, all I need to do is use crm_master.
>
>
>
> But for the preferred slave, there needs to an election amongst existing
> slaves. As of now I am using a variable in CIB with
> pref_slave|pref_slave_score|temp_score. If temp_score is 0, then the slave
> will update pref_slave and pref_slave_score and temp_score. If temp_score is
> non-zero, then the node compares its score with pref_slave_score and updates
> only if it is bigger.
>

What is the difference between a preferred slave and a normal one?
Sounds like what you really want is tri-state resources (instead of
the existing bi-state)

>
> Now I have 2 problems
>
> Everytime I change the CIB(which I am doing in pre-promote), the event
> (pre-promote) is getting retriggered.

Is doing it during post-promote an option?

> The event(pre-promote) is sent in parallel to all the slaves. So each slave
> thinks temp_score is 0, and overwrites with its score. Is there any way to
> serialize this using some sort of lock ?

Basically, no.

> Or is there a provision to store
> cluster-wide attributes apart from CIB ?

Also no.

> Regards
>
> Nirmala
>
>
>
>
>
> This e-mail and attachments contain confidential information from HUAWEI,
> which is intended only for the person or entity whose address is listed
> above. Any use of the information contained herein in any way (including,
> but not limited to, total or partial disclosure, reproduction, or
>
> dissemination) by persons other than the intended recipient's) is
> prohibited. If you receive this e-mail in error, please notify the sender by
> phone or email immediately and delete it!
>
>
>
>
> _______________________________________________
> 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
>




More information about the Pacemaker mailing list