[Linux-HA] resource can not be monitored

Dejan Muhamedagic dejanmm at fastmail.fm
Thu Sep 20 11:17:46 MDT 2007


Hi,

On Fri, Sep 21, 2007 at 12:54:49AM +0800, James Li wrote:
> I build a cluster with four nodes. 
> 
> ########/etc/init.d/ha.cf##############
> 
> autojoin any
> crm true
> bcast eth0
> node CST-2
> node CST-1
> node CST-3
> node CST-4
> respawn root /usr/lib/heartbeat/lrmd
> apiauth lrmd uid=root
> mcast eth1 224.0.0.1 694 2 0
> logfacility local5
> logfile /var/log/ha-log
> debug 1
> 
> 
> ######/var/lib/heartbeat/crm/cib.xml###########
>  <cib admin_epoch="0" have_quorum="false" ignore_dtd="false" num_peers="1"
> cib_feature_revision="1.3" generated="true" epoch="53" num_updates="1362"
> cib-last-written="Fri Sep 21 00:02:37 2007" ccm_transition="1"
> dc_uuid="b48f09b6-0257-4695-9cc7-23a6d6c7dabc">
>    <configuration>
>      <crm_config>
>        <cluster_property_set id="cib-bootstrap-options">
>          <attributes>
>            <nvpair id="cib-bootstrap-options-last-lrm-refresh"
> name="last-lrm-refresh" value="1190081488"/>
>            <nvpair name="stonith-enabled"
> id="cib-bootstrap-options-stonith-enabled" value="False"/>
>            <nvpair id="cib-bootstrap-options-no-quorum-policy"
> name="no-quorum-policy" value="ignore"/>
>          </attributes>
>        </cluster_property_set>
>      </crm_config>
>      <nodes>
>        <node id="b48f09b6-0257-4695-9cc7-23a6d6c7dabc" uname="cst-1"
> type="normal"/>
>        <node id="2aa7cde9-7a34-4e8d-8538-36d53c784cd1" uname="cst-2"
> type="normal"/>
>        <node id="94ad42a4-a6b3-45b5-be91-72c8344425a5" uname="cst-3"
> type="normal"/>
>        <node id="3eb3dbd1-425a-4a8a-aef7-0278cee6915a" uname="cst-4"
> type="normal"/>
>      </nodes>
>      <resources>
>        <group ordered="true" collocated="true" id="apache">
>          <primitive id="resource_ip" class="ocf" type="IPaddr"
> provider="heartbeat">
>            <instance_attributes id="resource_ip_instance_attrs">
>              <attributes>
>                <nvpair id="resource_ip_target_role" name="target_role"
> value="started"/>
>                <nvpair id="4c7ce3d3-8871-476d-81a0-616d2a0b8803" name="ip"
> value="192.168.70.200"/>
>                <nvpair id="1fbce1c4-a13b-4481-8d6b-e24074304a21" name="nic"
> value="eth0"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>          <primitive id="resource_fs" class="ocf" type="Filesystem"
> provider="heartbeat">
>            <instance_attributes id="fs_instance_attrs">
>              <attributes>
>                <nvpair id="fs_target_role" name="target_role" value="started"/>
>                <nvpair id="7b4d62d6-94f8-483c-b8ed-9f393b9bf53d" name="device"
> value="/dev/sdb1"/>
>                <nvpair id="58c78f26-cf08-4fd4-9ba1-5e4d38efb1a0"
> name="directory" value="/srv/www/htdocs"/>
>                <nvpair id="d0f64dcd-99da-460e-bd10-145b3ffccb4b" name="fstype"
> value="reiserfs"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>          <primitive id="resource_app" class="ocf" type="apache"
> provider="heartbeat">
>            <instance_attributes id="resource_app_instance_attrs">
>              <attributes>
>                <nvpair id="resource_app_target_role" name="target_role"
> value="started"/>
>                <nvpair id="fcd94d5b-eb7a-4cc0-9a52-8244a76f429b"
> name="configfile" value="/etc/apache2/httpd.conf"/>
>                <nvpair id="522db5f5-f477-4ebd-a9c3-1ac0e2f1bccc" name="httpd"
> value="/usr/sbin/httpd2-prefork"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>          <instance_attributes id="apache_instance_attrs">
>            <attributes>
>              <nvpair id="apache_target_role" name="target_role" value="started"/>
>            </attributes>
>          </instance_attributes>
>        </group>
>      </resources>
>      <constraints>
>        <rsc_location id="place_apache" rsc="apache">
>          <rule id="prefered_place_apache" score="100">
>            <expression attribute="#uname"
> id="47fc1160-9e5a-4ecf-ac08-1b8f2f4d180c" operation="eq" value="CST-1"/>
>          </rule>
>        </rsc_location>
>        <rsc_order id="order_ip" from="resource_app" type="after"
> to="resource_ip"/>
>        <rsc_order id="order_fs" from="resource_app" type="after"
> to="resource_fs"/>
>      </constraints>
>    </configuration>
>  </cib>
> 
> ########################################
> 
> when I start heartbeat , resource group apache starts in CST-1. And I execute:
> >/etc/init.d/apache2 stop
> 
> to stop apache
> 
> But heartbeat do not take any action to detect and handle the failure for
> resoucre apache.
> 
> 
> Are there any wrong in my configuration? 

Yes. You need to define a monitor operation for the apache
resource. Monitoring does not happen by default.

Thanks,

Dejan

> heartbeat version is heartbeat-2.0.8-0.19(sles10 sp1)
> 
> 
> 
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list