[Pacemaker] need cluster-wide variables

Steven Dake sdake at redhat.com
Wed Jan 11 23:08:03 UTC 2012


On 12/21/2011 12:01 AM, Nirmala S 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.
> 
> 

RE subject, the cpg interface is perfect for maintaining replicated
state among your cluster nodes.  man cpg_overview.

Regards
-steve

> 
> 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!
> 
>  
> 
> 
> 
> _______________________________________________
> 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