[Pacemaker] Check if resource is running on specific node

Thomas Baumann bt047265 at gmail.com
Thu Mar 3 05:38:23 EST 2011


I have the following scenario:

- resource 1 runs on Node A
- resource 2 should be started on Node B if resource 1 is running on Node A
- if resource 1 is not running on Node A, resource 2 should be stopped
and resource 3 started

What attribute is set on Node A, that exactly tells me that the
resource is running ? I want to use that for the decision how to
handle the resource on Node B.

If I check the transient state of the node, I am not sure what to use.



<node_state uname="m-lab-prx-lb-1" ha="active" in_ccm="true"
crmd="online" shutdown="0" join="member" expected="member"
id="m-lab-prx-lb-1" crm-debug-origin="do_state_transition">
      <transient_attributes id="m-lab-prx-lb-1">
        <instance_attributes id="status-m-lab-prx-lb-1">
          <nvpair id="status-m-lab-prx-lb-1-probe_complete"
name="probe_complete" value="true"/>
name="fail-count-res_mysqld_lb1-primitive" value="1"/>
name="last-failure-res_mysqld_lb1-primitive" value="1299094062"/>
name="fail-count-res_ser_lb1-primitive" value="1"/>
name="last-failure-res_ser_lb1-primitive" value="1299094062"/>

More information about the Pacemaker mailing list