Hi,

I am new pacemaker. I have been trying to setup Linux HA with heartbeat and
pacemaker in ec2.

I started with setting up Apache Server in HA using heartbeat only and
configuring my resource in haresources file, such that when heartbeats in 1
machines stop, the process gets started in the other machines. The only
problem was when the process itself gets stopped, it is not detected unless
the heartbeat also goes off. To fix this, I had to move to pacemaker +
heartbeat.

Now when I kill the process, it gets started on the same machine, but when I
kill the heartbeat itself, the process should move to the other node which
is not happening. 


*Output from crm configure show:*

node $id="091a7142-4272-402a-aeff-ce1b25123668" prod-hb-nmn-002
node $id="7910c4de-718d-45d7-b4da-24b3b65b9855" prod-hb-nmn-001
primitive apache ocf:heartbeat:apache \
        params configfile="/etc/httpd/conf/httpd.conf" \
        op monitor interval="60s" \
        op start interval="0" timeout="40s" \
        op stop interval="0" timeout="60s" \
        meta target-role="Started"
property $id="cib-bootstrap-options" \
        dc-version="1.0.9-89bd754939df5150de7cd76835f98fe90851b677" \
        cluster-infrastructure="Heartbeat" \
        no-quorum-policy="ignore" \
        stonith-enabled="false" \
        last-lrm-refresh="1371037740" \
        default-resource-stickiness="100" \
        expected-quorum-votes="2"


*Output from cr_mon -1r*

============
Last updated: Sat Jun 15 14:22:17 2013
Stack: Heartbeat
Current DC: prod-hb-nmn-002 (091a7142-4272-402a-aeff-ce1b25123668) -
partition with quorum
Version: 1.0.9-89bd754939df5150de7cd76835f98fe90851b677
2 Nodes configured, 2 expected votes
1 Resources configured.
============

Online: [ prod-hb-nmn-001 prod-hb-nmn-002 ]

Full list of resources:

 apache (ocf::heartbeat:apache):        Started prod-hb-nmn-001



*Output from the cibadmin -Ql*

==============================================================
<cib validate-with="pacemaker-1.0" crm_feature_set="3.0.1" have-quorum="1"
admin_epoch="0" epoch="76" dc-uuid="091a7142-4272-402a-aeff-ce1b25123668"
num_updates="33">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
value="1.0.9-89bd754939df5150de7cd76835f98fe90851b677"/>
        <nvpair id="cib-bootstrap-options-cluster-infrastructure"
name="cluster-infrastructure" value="Heartbeat"/>
        <nvpair id="cib-bootstrap-options-no-quorum-policy"
name="no-quorum-policy" value="ignore"/>
        <nvpair id="cib-bootstrap-options-stonith-enabled"
name="stonith-enabled" value="false"/>
        <nvpair id="cib-bootstrap-options-last-lrm-refresh"
name="last-lrm-refresh" value="1371037740"/>
        <nvpair id="cib-bootstrap-options-default-resource-stickiness"
name="default-resource-stickiness" value="100"/>
        <nvpair id="cib-bootstrap-options-expected-quorum-votes"
name="expected-quorum-votes" value="2"/>
      </cluster_property_set>
    </crm_config>
    <nodes>
      <node id="7910c4de-718d-45d7-b4da-24b3b65b9855"
uname="prod-hb-nmn-001" type="normal"/>
      <node id="091a7142-4272-402a-aeff-ce1b25123668"
uname="prod-hb-nmn-002" type="normal"/>
    </nodes>
    <resources>
      <primitive class="ocf" id="apache" provider="heartbeat" type="apache">
        <instance_attributes id="apache-instance_attributes">
          <nvpair id="apache-instance_attributes-configfile"
name="configfile" value="/etc/httpd/conf/httpd.conf"/>
        </instance_attributes>
        <operations>
          <op id="apache-monitor-60s" interval="60s" name="monitor"/>
          <op id="apache-start-0" interval="0" name="start" timeout="40s"/>
          <op id="apache-stop-0" interval="0" name="stop" timeout="60s"/>
        </operations>
        <meta_attributes id="apache-meta_attributes">
          <nvpair id="apache-meta_attributes-target-role" name="target-role"
value="Started"/>
        </meta_attributes>
      </primitive>
    </resources>
    <constraints/>
    <rsc_defaults/>
    <op_defaults/>
  </configuration>
  <status>
    <node_state uname="prod-hb-nmn-002" ha="active" in_ccm="true"
crmd="online" join="member" expected="member" shutdown="0"
id="091a7142-4272-402a-aeff-ce1b25123668">
      <transient_attributes id="091a7142-4272-402a-aeff-ce1b25123668">
        <instance_attributes
id="status-091a7142-4272-402a-aeff-ce1b25123668">
          <nvpair
id="status-091a7142-4272-402a-aeff-ce1b25123668-probe_complete"
name="probe_complete" value="true"/>
          <nvpair
id="status-091a7142-4272-402a-aeff-ce1b25123668-fail-count-apache"
name="fail-count-apache" value="INFINITY"/>
          <nvpair
id="status-091a7142-4272-402a-aeff-ce1b25123668-last-failure-apache"
name="last-failure-apache" value="1371303437"/>
        </instance_attributes>
      </transient_attributes>
      <lrm id="091a7142-4272-402a-aeff-ce1b25123668">
        <lrm_resources>
          <lrm_resource id="apache" type="apache" class="ocf"
provider="heartbeat">
            <lrm_rsc_op id="apache_monitor_0" operation="monitor"
crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
transition-key="6:0:7:42351163-a1d4-4077-8e65-968b1a65f4cf"
transition-magic="0:7;6:0:7:42351163-a1d4-4077-8e65-968b1a65f4cf"
call-id="2" rc-code="7" op-status="0" interval="0" last-run="1371301893"
last-rc-change="1371301893" exec-time="80" queue-time="0"
op-digest="88eb8382443cc988d0e6ddee48ebac1a"/>
            <lrm_rsc_op id="apache_start_0" operation="start"
crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
transition-key="7:7:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
transition-magic="0:1;7:7:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
call-id="3" rc-code="1" op-status="0" interval="0" last-run="1371303435"
last-rc-change="1371303435" exec-time="1140" queue-time="0"
op-digest="88eb8382443cc988d0e6ddee48ebac1a"/>
            <lrm_rsc_op id="apache_stop_0" operation="stop"
crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
transition-key="1:9:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
transition-magic="0:0;1:9:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
call-id="4" rc-code="0" op-status="0" interval="0" last-run="1371303436"
last-rc-change="1371303436" exec-time="1110" queue-time="0"
op-digest="88eb8382443cc988d0e6ddee48ebac1a"/>
          </lrm_resource>
        </lrm_resources>
      </lrm>
    </node_state>
    <node_state uname="prod-hb-nmn-001" ha="active" in_ccm="true"
crmd="online" shutdown="0" id="7910c4de-718d-45d7-b4da-24b3b65b9855"
join="member" expected="member">
      <lrm id="7910c4de-718d-45d7-b4da-24b3b65b9855">
        <lrm_resources>
          <lrm_resource id="apache" type="apache" class="ocf"
provider="heartbeat">
            <lrm_rsc_op id="apache_monitor_0" operation="monitor"
crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
transition-key="4:13:7:42351163-a1d4-4077-8e65-968b1a65f4cf"
transition-magic="0:7;4:13:7:42351163-a1d4-4077-8e65-968b1a65f4cf"
call-id="2" rc-code="7" op-status="0" interval="0" last-run="1371304391"
last-rc-change="1371304391" exec-time="60" queue-time="0"
op-digest="88eb8382443cc988d0e6ddee48ebac1a"/>
            <lrm_rsc_op id="apache_start_0" operation="start"
crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
transition-key="6:13:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
transition-magic="0:0;6:13:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
call-id="3" rc-code="0" op-status="0" interval="0" last-run="1371304392"
last-rc-change="1371304392" exec-time="1120" queue-time="0"
op-digest="88eb8382443cc988d0e6ddee48ebac1a"/>
            <lrm_rsc_op id="apache_monitor_60000" operation="monitor"
crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
transition-key="7:14:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
transition-magic="0:0;7:14:0:42351163-a1d4-4077-8e65-968b1a65f4cf"
call-id="4" rc-code="0" op-status="0" interval="60000" last-run="1371304394"
last-rc-change="1371304394" exec-time="70" queue-time="0"
op-digest="996d31abd0ebd6e4505bdf69d362eb8d"/>
          </lrm_resource>
        </lrm_resources>
      </lrm>
      <transient_attributes id="7910c4de-718d-45d7-b4da-24b3b65b9855">
        <instance_attributes
id="status-7910c4de-718d-45d7-b4da-24b3b65b9855">
          <nvpair
id="status-7910c4de-718d-45d7-b4da-24b3b65b9855-probe_complete"
name="probe_complete" value="true"/>
        </instance_attributes>
      </transient_attributes>
    </node_state>
  </status>
</cib>
==============================================================



--
View this message in context: 
http://linux-ha.996297.n3.nabble.com/Pacemaker-Resource-dont-get-started-on-the-standby-node-tp14686.html
Sent from the Linux-HA mailing list archive at Nabble.com.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to