[Pacemaker] Question about master/slave resource promotion

David Vossel dvossel at redhat.com
Fri Feb 24 23:31:01 UTC 2012


Hey,

I have a 2 node cluster with a multi-state master/slave resource. When the multi-state resources start up on each node they enter the Slave role.  At that point I can't figure out how to promote the resource to activate the Master role on one of the nodes. Is there anything special I need to do to get an instance of my multi-state resource to promote to the Master role? 

I'm using corosync v1 plugin if that makes any difference.  Below is a simple configuration demonstrating what is going on.  After promoting the resource in the last step, I'd expect to see a Master resource on one node, and a Slave resource on the other.  That doesn't happen, I end up with two Slave resources instead.

-------------- CRM showing config and attempt at promotion of MS_DUMMY resource.
crm(live)# configure show
node fc16-builder
node fc16-builder2
primitive DUMMY ocf:pacemaker:Dummy \
        op monitor interval="15" role="Slave" timeout="60s" \
        op monitor interval="30" role="Master" timeout="60s"
ms MS_DUMMY DUMMY \
        meta target-role="Master" clone-max="2" clone-node-max="1" master-max="1" master-node-max="1" notify="true"
property $id="cib-bootstrap-options" \
        dc-version="1.1.6-8567333" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore"

crm(live)# resource status
 Master/Slave Set: MS_DUMMY [DUMMY]
     Slaves: [ fc16-builder fc16-builder2 ]

crm(live)# resource promote MS_DUMMY

crm(live)# resource status
 Master/Slave Set: MS_DUMMY [DUMMY]
     Slaves: [ fc16-builder fc16-builder2 ]
------------------------------------------------


---- CIB configuration
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.6-8567333"/>
        <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="openais"/>
        <nvpair id="cib-bootstrap-options-expected-quorum-votes" name="expected-quorum-votes" value="2"/>
        <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
        <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
      </cluster_property_set>
    </crm_config>
    <nodes>
      <node id="fc16-builder" type="normal" uname="fc16-builder"/>
      <node id="fc16-builder2" type="normal" uname="fc16-builder2"/>
    </nodes>
    <resources>
      <master id="MS_DUMMY">
        <meta_attributes id="MS_DUMMY-meta_attributes">
          <nvpair id="MS_DUMMY-meta_attributes-target-role" name="target-role" value="Master"/>
          <nvpair id="MS_DUMMY-meta_attributes-clone-max" name="clone-max" value="2"/>
          <nvpair id="MS_DUMMY-meta_attributes-clone-node-max" name="clone-node-max" value="1"/>
          <nvpair id="MS_DUMMY-meta_attributes-master-max" name="master-max" value="1"/>
          <nvpair id="MS_DUMMY-meta_attributes-master-node-max" name="master-node-max" value="1"/>
          <nvpair id="MS_DUMMY-meta_attributes-notify" name="notify" value="true"/>
        </meta_attributes>
        <primitive class="ocf" id="DUMMY" provider="pacemaker" type="Dummy">
          <operations>
            <op id="DUMMY-monitor-15s" interval="15" name="monitor" role="Slave" timeout="60s"/>
            <op id="DUNNY-monitor-30s" interval="30" name="monitor" role="Master" timeout="60s"/>
          </operations>
        </primitive>
      </master>
    </resources>
    <constraints/>
  </configuration>


Thanks,
-- David




More information about the Pacemaker mailing list