Hi!
I have some problem to modify a configuration for heartbeat cluster. I
have two nodes and one resource group (mysql_group) like this:
# crm_mon -1
============
Last updated: Fri Jan 28 17:26:15 2011
Current DC: perla-db2 (417fbd34-dd9d-4912-9a65-232a64f52af5)
2 Nodes configured.
1 Resources configured.
============
Node: perla-db1 (1712adcb-9bb6-45ca-ade8-7f20289c820a): online
Node: perla-db2 (417fbd34-dd9d-4912-9a65-232a64f52af5): online
Resource Group: mysql_group
vip (ocf::heartbeat:IPaddr): Started perla-db2
data_dir (ocf::heartbeat:Filesystem): Started perla-db2
mysql (lsb:mysql): Started perla-db2
MySql is configured and works on both nodes.
If the running node is rebooted the cluster works and the service will
switched to the other node. But if I stop MySql, the cluster don't
switch or try to restart it.
How to configure the cluster to check if MySql service is alive?
This is my configuration:
#############
# /etc/ha.d/ha.cf
#############
crm on
logfile /var/log/ha-log
keepalive 2
deadtime 25
initdead 120
udpport 694
mcast eth0 239.0.0.43 694 1 0
auto_failback off
node PERLA-DB1
node PERLA-DB2
#########################
# /var/lib/heartbeat/crm/cib.xml
#########################
<cib generated="true" admin_epoch="0" have_quorum="true"
ignore_dtd="false" num_peers="2" cib_feature_revision="2.0"
crm_feature_set="2.0" ccm_transition="2" epoch="47"
dc_uuid="417fbd34-dd9d-4912-9a65-232a64f52af5" num_updates="3"
cib-last-written="Fri Jan 28 16:33:14 2011">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-dc-version"
name="dc-version" value="2.1.4-node:
74d736e8f667fae1e4a904ccd13ad6553c5c010c"/>
<nvpair id="cib-bootstrap-options-last-lrm-refresh"
name="last-lrm-refresh" value="1289931344"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="1712adcb-9bb6-45ca-ade8-7f20289c820a"
uname="perla-db1" type="normal"/>
<node id="417fbd34-dd9d-4912-9a65-232a64f52af5"
uname="perla-db2" type="normal"/>
</nodes>
<resources>
<group id="mysql_group">
<meta_attributes id="mysql_group_meta_attrs">
<attributes>
<nvpair id="mysql_group_metaattr_target_role"
name="target_role" value="stopped"/>
<nvpair id="mysql_group_metaattr_ordered" name="ordered"
value="true"/>
<nvpair id="mysql_group_metaattr_collocated"
name="collocated" value="true"/>
</attributes>
</meta_attributes>
<primitive id="vip" class="ocf" type="IPaddr" provider="heartbeat">
<instance_attributes id="vip_instance_attrs">
<attributes>
<nvpair id="2cb9820c-fe32-4025-8502-668ed9f76f4b"
name="ip" value="10.0.8.23"/>
<nvpair id="683f4522-256e-412a-aae9-3c04b6cbfd66"
name="nic" value="eth0"/>
<nvpair id="9d17ed6f-eac4-44a4-a9e2-41ac92be0ad5"
name="cidr_netmask" value="255.255.255.0"/>
</attributes>
</instance_attributes>
<meta_attributes id="vip_meta_attrs">
<attributes>
<nvpair id="vip_metaattr_target_role" name="target_role"
value="started"/>
</attributes>
</meta_attributes>
</primitive>
<primitive id="data_dir" class="ocf" type="Filesystem"
provider="heartbeat">
<instance_attributes id="data_dir_instance_attrs">
<attributes>
<nvpair id="2eea535b-9afd-41f8-8b32-76c092f116e8"
name="device" value="/dev/sdd1"/>
<nvpair id="c9a53e5e-3ac6-4181-9794-fe4f69521fdf"
name="directory" value="/MYSQL_DATA"/>
<nvpair id="f1ed8ccb-c95c-4794-ab18-5cd9d78b6b68"
name="fstype" value="ext3"/>
</attributes>
</instance_attributes>
<meta_attributes id="data_dir_meta_attrs">
<attributes>
<nvpair id="data_dir_metaattr_target_role"
name="target_role" value="started"/>
</attributes>
</meta_attributes>
</primitive>
<primitive id="mysql" class="lsb" type="mysql" provider="heartbeat">
<meta_attributes id="mysql_meta_attrs">
<attributes>
<nvpair id="mysql_metaattr_target_role"
name="target_role" value="started"/>
</attributes>
</meta_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_location id="location_mysql_group" rsc="mysql_group">
<rule id="prefered_location_mysql_group" score="INFINITY">
<expression attribute="#is_dc"
id="73cd0893-bb98-4e0d-8c40-2486ee44a5b5" operation="eq"
value="true"/>
</rule>
</rsc_location>
</constraints>
</configuration>
</cib>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems