[Pacemaker] HELP! HELP! HELP!

Andrew Beekhof andrew at beekhof.net
Mon May 30 20:16:58 UTC 2011


Did you check the schema?

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.
>
> thank you very much!
>
> but where should I put role="Master"? if I write like this:
>
> <rsc_location id="constraints-rsc_location-mastr-owl0" rsc="mastr"
> node="owl0" score="1" role="Master" />
>
> <rsc_location id="constraints-rsc_location-mastr-owl2" rsc="mastr"
> node="owl2" score="1"/>
>
> it will not be accepted by cibadmin. what is a typical example for this
> case?
>
> 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