[Pacemaker] HELP! HELP! HELP!

Andrew Beekhof andrew at beekhof.net
Mon May 30 09:33:26 UTC 2011


2011/5/30 项磊 <l.darkfire at hotmail.com>:
>>> Hi, friends, I have a problem with Pacemaker 1.1.5.
>>>
>>> When I configure a master resource as usual, and set
>>> target-role=“Master”,
>>> but all instances are in slave state, no instance is promoted to master
>>> state.
>>>
>>> Who can tell me how to promote a instance to master?
>
>>have your RA call crm_master with a promotion preference or create a
>>location constraint for the master role.
>
>>>
>>> I guess it is a change in version 1.1.5, because I found “+ High: PE: Bug
>>> lf#2554 - target-role alone is not sufficient to promote resources” in
>>> ChangeLog.
>
>>yes
>
> here is part of my cib.xml about the master/slave resource:
>
> ...
>
> <master id="mastr">
>   <meta_attributes id="resource-mastr-meta_attributes">
>     <nvpair id="resource-mastr-meta_attributes-globally-unique"
> name="globally-unique" value="false"/>
>     <nvpair id="resource-mastr-meta_attributes-clone-max" name="clone-max"
> value="2"/>
>     <nvpair id="resource-mastr-meta_attributes-clone-node-max"
> name="clone-node-max" value="1"/>
>     <nvpair id="resource-mastr-meta_attributes-master-max" name="master-max"
> value="1"/>
>     <nvpair id="resource-mastr-meta_attributes-master-node-max"
> name="master-node-max" value="1"/>
>   </meta_attributes>
>   <primitive id="mastr-RESOURCE" class="ocf" type="master"
> provider="heartbeat">
>     <meta_attributes id="resource-mastr-RESOURCE-meta_attributes">
>       <nvpair id="resource-mastr-RESOURCE-meta_aa" name="priority"
> value="1"/>
>       <nvpair
> id="resource-mastr-RESOURCE-meta_attributes-migration-threshold"
> name="migration-threshold" value="0"/>
>       <nvpair id="resource-mastr-RESOURCE-meta_attributes-failure-timeout"
> name="failure-timeout" value="0"/>
>       <nvpair id="resource-mastr-RESOURCE-meta_attributes-is-managed"
> name="is-managed" value="true"/>
>       <nvpair id="resource-mastr-RESOURCE-meta_attributes-target-role"
> name="target-role" value="Master"/>
>     </meta_attributes>
>     <operations>
>       <op id="resource-mastr-RESOURCE-operation-start" name="start"
> interval="0" timeout="60s" on-fail="restart"/>
>       <op id="resource-mastr-RESOURCE-operation-stop" name="stop"
> interval="0" timeout="60s" on-fail="block"/>
>       <op id="resource-mastr-RESOURCE-operation-monitor" name="monitor"
> interval="0" timeout="60s" on-fail="restart"/>
>     </operations>
>   </primitive>
> </master>
>
> ...
>
> <rsc_location id="constraints-rsc_location-mastr-owl0" rsc="mastr"
> node="owl0" score="1"/>
> <rsc_location id="constraints-rsc_location-mastr-owl2" rsc="mastr"
> node="owl2" score="1"/>

There is no role field listed here.

> ...
>
> but when I start pacemaker, both instance on owl0 and owl1 is slave, in old
> pacemaker version, one of them will be promoted.
>
> I want to know how to let pacemaker promote a slave to master automatically.
> the version I use is the latest 1.1.5: "Pacemaker-1-1-e872eeb39a5f".
>
> thank you !!!
>
> _______________________________________________
> 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>




More information about the Pacemaker mailing list