Hello,
I would like to know, if I can limit Heartbeat monitor operations to run
on some nodes in cluster only?
Here is the situation: I have a three node cluster. On two nodes, I have
installed DRDB and iscsi-target, so it creates a high-available network
storage. On the third node, I would like to have some resources dealing
with mounting of filesystems etc, that's not important. The important
thing is, that on the third node there is no DRBD and iscsi-target
software installed. On all nodes, I have the latest version of Heartbeat
(2.1.3) with Pacemaker.
And here is the problem: when I start up the main two nodes, it's all
behaving pretty well. But when I start the last node, the cluster goes
mad and starts to stop my resources - because it is trying to start the
automatic monitoring operations on the last node and it can't find the
init scripts for drbd and iscsi-target. But the last node was never
intended to run those resources ever, so why it is trying to start
monitoring operations for these resources? I don't even have those
operations defined in cib.xml.
I found a workaround for it: I placed a dummy scripts on the last node,
which only purpose is to return "exit 0" for a status call.... so it's
working now, but I would like to find a nicer solution for this problem.
Thanks for help,
Luke
here is my cib.xml:
<cib generated="true" admin_epoch="0" ignore_dtd="false" num_peers="2"
have_quorum="1" cib_feature_revision="2.0" crm_feature_set="2.1"
epoch="25" num_updates="55" cib-last-written="Thu Jul 10 11:22:54 2008"
dc_uuid="36958342-0ee6-407b-b996-2137e7796ae1">
<configuration>
<crm_config>
<cluster_property_set id="main_set">
<attributes>
<nvpair name="symmetric-cluster" id="symmetric-cluster"
value="false"/>
<nvpair id="no-quorum-policy" name="no-quorum-policy"
value="ignore"/>
<nvpair id="is-managed-default" name="is-managed-default"
value="true"/>
<nvpair id="default-resource-stickiness"
name="default-resource-stickiness" value="0"/>
<nvpair id="default-resource-failure-stickiness"
name="default-resource-failure-stickiness" value="0"/>
<nvpair id="default-action-timeout"
name="default-action-timeout" value="120s"/>
<nvpair id="dc-deadtime" name="dc-deadtime" value="10s"/>
<nvpair id="cluster-recheck-interval"
name="cluster-recheck-interval" value="0"/>
<nvpair id="election-timeout" name="election-timeout"
value="2min"/>
<nvpair id="shutdown-escalation" name="shutdown-escalation"
value="20min"/>
<nvpair id="crmd-integration-timeout"
name="crmd-integration-timeout" value="3min"/>
<nvpair id="crmd-finalization-timeout"
name="crmd-finalization-timeout" value="10min"/>
<nvpair id="cluster-delay" name="cluster-delay" value="180s"/>
<nvpair id="pe-error-series-max" name="pe-error-series-max"
value="-1"/>
<nvpair id="pe-warn-series-max" name="pe-warn-series-max"
value="-1"/>
<nvpair id="pe-input-series-max" name="pe-input-series-max"
value="-1"/>
<nvpair id="startup-fencing" name="startup-fencing"
value="true"/>
</attributes>
</cluster_property_set>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-dc-version"
name="dc-version" value="0.6.5-node:
b9fe723d1ac5aad89cc457c727d35e14ef2a61c8"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="36958342-0ee6-407b-b996-2137e7796ae1"
uname="node_target1" type="normal"/>
<node id="402582fc-2252-4048-880e-7b9aa25dee95"
uname="node_target2" type="normal"/>
<node id="44e86487-3fa7-4580-ba30-b2f9593953bd"
uname="node_client" type="normal"/>
</nodes>
<resources>
<group id="ha_storage">
<primitive id="iscsi_addr" class="ocf" type="IPaddr2"
provider="heartbeat">
<operations>
<op id="iscsi_addr-op01" name="monitor" interval="15s"
timeout="5s"/>
</operations>
<instance_attributes id="iscsi_addr-ia">
<attributes>
<nvpair id="iscsi_addr-attr01" name="ip"
value="192.168.1.32"/>
<nvpair id="iscsi_addr-attr02" name="cidr_netmask"
value="24"/>
<nvpair id="iscsi_addr-attr03" name="target_role"
value="started"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="heartbeat" type="drbddisk"
provider="heartbeat" id="iscsi_disk">
<instance_attributes id="iscsi_disk-ia">
<attributes>
<nvpair id="iscsi_disk-attr01" name="1" value="storage"/>
<nvpair id="iscsi_disk-attr02" name="target_role"
value="started"/>
</attributes>
</instance_attributes>
</primitive>
<primitive id="iscsi_target" class="lsb" type="iscsitarget">
<instance_attributes id="iscsi_target-ia">
<attributes>
<nvpair id="iscsi_target-attr01" name="target_role"
value="started"/>
</attributes>
</instance_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_location id="run_ha_storage" rsc="ha_storage">
<rule score="-INFINITY" boolean_op="and"
id="run_ha_storage_only_there">
<expression attribute="#uname" operation="ne"
value="node_target2" id="expr_run_ha_storage1"/>
<expression attribute="#uname" operation="ne"
value="node_target1" id="expr_run_ha_storage2"/>
</rule>
<rule score="600" id="run_it_here">
<expression attribute="#uname" operation="eq"
value="node_target2" id="expr_run_it_here1"/>
</rule>
</rsc_location>
</constraints>
</configuration>
and here is part of heartbeat log without my little workaround applied:
Jul 10 12:23:45 node_client attrd: [23510]: info: main: Starting mainloop...
Jul 10 12:23:47 node_client crmd: [23511]: debug: get_lrm_resource:
Adding rsc iscsi_addr before operation
Jul 10 12:23:47 node_client lrmd: [23508]: debug: on_msg_add_rsc:client
[23511] adds resource iscsi_addr
Jul 10 12:23:47 node_client crmd: [23511]: info: do_lrm_rsc_op:
Performing op=iscsi_addr_monitor_0
key=7:16:7:586115f6-9c8f-4ca4-b9b6-4aae64313b36)
Jul 10 12:23:47 node_client lrmd: [23508]: debug:
on_msg_perform_op:2278: copying parameters for rsc iscsi_addr
Jul 10 12:23:47 node_client lrmd: [23508]: debug: on_msg_perform_op: add
an operation operation monitor[2] on ocf::IPaddr2::iscsi_addr for client
23511, its parameters: target_role=[started] ip=[192.168.1.32]
CRM_meta_op_target_rc=[7] cidr_netmask=[24] CRM_meta_timeout=[120000]
crm_feature_set=[2.1] to the operation list.
Jul 10 12:23:47 node_client lrmd: [23508]: info: rsc:iscsi_addr: monitor
Jul 10 12:23:47 node_client crmd: [23511]: debug: do_lrm_rsc_op:
Recording pending op: 2 - iscsi_addr_monitor_0 iscsi_addr:2
Jul 10 12:23:47 node_client crmd: [23511]: debug: get_lrm_resource:
Adding rsc iscsi_disk before operation
Jul 10 12:23:47 node_client lrmd: [23508]: debug: on_msg_add_rsc:client
[23511] adds resource iscsi_disk
Jul 10 12:23:47 node_client crmd: [23511]: info: do_lrm_rsc_op:
Performing op=iscsi_disk_monitor_0
key=8:16:7:586115f6-9c8f-4ca4-b9b6-4aae64313b36)
Jul 10 12:23:47 node_client lrmd: [23508]: debug:
on_msg_perform_op:2278: copying parameters for rsc iscsi_disk
Jul 10 12:23:47 node_client lrmd: [23508]: debug: on_msg_perform_op: add
an operation operation monitor[3] on heartbeat::drbddisk::iscsi_disk for
client 23511, its parameters: target_role=[started]
CRM_meta_op_target_rc=[7] 1=[frodo] CRM_meta_timeout=[120000]
crm_feature_set=[2.1] to the operation list.
Jul 10 12:23:47 node_client lrmd: [23508]: info: rsc:iscsi_disk: monitor
Jul 10 12:23:47 node_client lrmd: [23517]: ERROR:
(raexechb.c:execra:247) execv failed for /etc/ha.d/resource.d//drbddisk:
No such file or directory
Jul 10 12:23:47 node_client lrmd: [23508]: WARN: Managed
iscsi_disk:monitor process 23517 exited with return code 5.
Jul 10 12:23:47 node_client lrmd: [23508]: CRIT: read_pipe:3522 Attempt
to read from closed file descriptor 9.
Jul 10 12:23:47 node_client lrmd: [23508]: notice: read_pipe::3528:
lrmd_op has been freed
Jul 10 12:23:47 node_client crmd: [23511]: debug: do_lrm_rsc_op:
Recording pending op: 3 - iscsi_disk_monitor_0 iscsi_disk:3
Jul 10 12:23:47 node_client crmd: [23511]: debug: get_lrm_resource:
Adding rsc iscsi_target before operation
Jul 10 12:23:47 node_client lrmd: [23508]: debug: on_msg_add_rsc:client
[23511] adds resource iscsi_target
Jul 10 12:23:47 node_client lrmd: [23508]: notice: lrmd_rsc_new(): No
lrm_rprovider field in message
Jul 10 12:23:47 node_client crmd: [23511]: info: do_lrm_rsc_op:
Performing op=iscsi_target_monitor_0
key=9:16:7:586115f6-9c8f-4ca4-b9b6-4aae64313b36)
Jul 10 12:23:47 node_client lrmd: [23508]: debug:
on_msg_perform_op:2278: copying parameters for rsc iscsi_target
Jul 10 12:23:47 node_client lrmd: [23508]: debug: on_msg_perform_op: add
an operation operation monitor[4] on lsb::iscsitarget::iscsi_target for
client 23511, its parameters: target_role=[started]
CRM_meta_op_target_rc=[7] CRM_meta_timeout=[120000]
crm_feature_set=[2.1] to the operation list.
Jul 10 12:23:47 node_client lrmd: [23508]: info: rsc:iscsi_target: monitor
Jul 10 12:23:47 node_client lrmd: [23520]: ERROR:
(raexeclsb.c:execra:265) execv failed for /etc/init.d/iscsitarget: No
such file or directory
Jul 10 12:23:47 node_client crmd: [23511]: debug: do_lrm_rsc_op:
Recording pending op: 4 - iscsi_target_monitor_0 iscsi_target:4
Jul 10 12:23:47 node_client crmd: [23511]: info: process_lrm_event: LRM
operation iscsi_disk_monitor_0 (call=3, rc=5) complete
Jul 10 12:23:47 node_client lrmd: [23508]: WARN: Managed
iscsi_target:monitor process 23520 exited with return code 5.
Jul 10 12:23:47 node_client crmd: [23511]: debug:
build_operation_update: Calculated digest
63888612948ee6ace026e6f4d9c18657 for iscsi_disk_monitor_0
(0:5;8:16:7:586115f6-9c8f-4ca4-b9b6-4aae64313b36)
Jul 10 12:23:47 node_client crmd: [23511]: debug: log_data_element:
build_operation_update: digest:source <parameters target_role="started"
1="frodo"/>
Jul 10 12:23:47 node_client crmd: [23511]: debug: do_update_resource:
Sent resource state update message: 16
Jul 10 12:23:47 node_client crmd: [23511]: debug: process_lrm_event: Op
iscsi_disk_monitor_0 (call=3, stop_id=iscsi_disk:3): Confirmed
Jul 10 12:23:47 node_client crmd: [23511]: info: process_lrm_event: LRM
operation iscsi_target_monitor_0 (call=4, rc=5) complete
Jul 10 12:23:47 node_client crmd: [23511]: debug:
build_operation_update: Calculated digest
08b7001b97ccdaa1ca23a9f165256bc1 for iscsi_target_monitor_0
(0:5;9:16:7:586115f6-9c8f-4ca4-b9b6-4aae64313b36)
Jul 10 12:23:47 node_client crmd: [23511]: debug: log_data_element:
build_operation_update: digest:source <parameters target_role="started"/>
Jul 10 12:23:47 node_client crmd: [23511]: debug: do_update_resource:
Sent resource state update message: 17
Jul 10 12:23:47 node_client crmd: [23511]: debug: process_lrm_event: Op
iscsi_target_monitor_0 (call=4, stop_id=iscsi_target:4): Confirmed
Jul 10 12:23:47 node_client lrmd: [23508]: WARN: Managed
iscsi_addr:monitor process 23516 exited with return code 7.
Jul 10 12:23:47 node_client crmd: [23511]: info: process_lrm_event: LRM
operation iscsi_addr_monitor_0 (call=2, rc=7) complete
Jul 10 12:23:47 node_client crmd: [23511]: debug:
build_operation_update: Calculated digest
edf3e8d9ac135ed42bbebb263ada2024 for iscsi_addr_monitor_0
(0:7;7:16:7:586115f6-9c8f-4ca4-b9b6-4aae64313b36)
Jul 10 12:23:47 node_client crmd: [23511]: debug: log_data_element:
build_operation_update: digest:source <parameters target_role="started"
ip="192.168.1.32" cidr_netmask="24"/>
Jul 10 12:23:47 node_client crmd: [23511]: debug: do_update_resource:
Sent resource state update message: 18
Jul 10 12:23:47 node_client crmd: [23511]: debug: process_lrm_event: Op
iscsi_addr_monitor_0 (call=2, stop_id=iscsi_addr:2): Confirmed
Jul 10 12:23:49 node_client crmd: [23511]: debug: cib_rsc_callback:
Resource update 16 complete: rc=0
Jul 10 12:23:49 node_client crmd: [23511]: debug: cib_rsc_callback:
Resource update 17 complete: rc=0
Jul 10 12:23:49 node_client crmd: [23511]: debug: cib_rsc_callback:
Resource update 18 complete: rc=0
begin:vcard
fn:Lukas Pecha
n:Pecha;Lukas
org:TTC MARCONI;R & D
adr:;;Trebohosticka 5;Praha 10;Prague;10000;Czech Republic
email;internet:[EMAIL PROTECTED]
title:Technical specialist
tel;work:+420234051745
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems