[Pacemaker] need cluster-wide variables

Nirmala S nirmalas at huawei.com
Wed Dec 21 07:01:16 UTC 2011


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.

 

Now I have 2 problems

1.	Everytime I change the CIB(which I am doing in pre-promote), the
event (pre-promote) is getting retriggered. 
2.	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 ? Or is there a provision
to store cluster-wide attributes apart from CIB ? 

 

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!

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111221/0acfddf2/attachment-0003.html>


More information about the Pacemaker mailing list