On Nov 8, 2007, at 2:40 PM, Artur Pydo wrote:
Hello,
Sorry, this message is quite long.
I have some Heartbeat2 newbie questions about the following setup, i
was unable to find the right solutions for these from the web site.
My current configuration :
- 2 nodes, 'av' and 'sc430', active/active cluster
- 'group_1' resources should run on 'av' as long as possible
- 'group_2' resources should run on 'sc430' as long as possible
- as long as possible means for me that the monitored resources can
start and run on the node and that the node has network connectivity.
- In my configuration below i setup auto_failback to off to have to
put things back in place _manually_ if something bad happens.
auto_failback has no function in a v2 cluster
set default_resource_stickiness=INFINITY instead
There are my questions :
- How to modify my current cib.xml to be able to run resources on a
node as long as the node can ping at least one of the routers ?
try this:
<rsc_location id="connected-2" rsc="group_1">
<rule id="connected:rule-1" score_attribute="-INFINITY" >
<expression id="connected:expr:notdefined" attribute="pingd"
operation="not_defined"/>
</rule>
</rsc_location>
and the same for group_2
- How to avoid pingd to move my resources from one node to the other
while the first node network connectivity is down for less than 30
seconds (i modified the -d parameter, but i'm not sure it's enough)
yes, thats correct
- How can i avoid stopping resources everywere if there is no
network connectivity at all on any node ? The main background here
is to migrate resources only if the other node has some network
connectivity otherwise do nothing (let the resources run).
this conflicts with the first question "as long as the node can ping
at least one of the routers"
which behavior do you want?
- I have exactly the same setup to do with auto_failback on. Is
changing the auto_failback option in ha.cf enough to achieve this ?
as above, no.
Thanks a lot for your attention and help.
============================================================
ha.cf :
use_logd on
udpport 694
keepalive 1 # 1 second
deadtime 10
initdead 80
ucast eth0 192.168.1.253
ucast eth0 192.168.1.252
#serial /dev/ttyS0 #if you use serial
#baud 19200 #if you use serial
node av sc430
crm yes
auto_failback off
ping_group routers 192.168.1.254 192.168.1.1
respawn root /usr/lib/heartbeat/pingd -m 100 -d 30s -a pingd
============================================================
cib.xml (i hope it's still readable) :
<cib admin_epoch="0" have_quorum="true" num_peers="2"
cib_feature_revision="1.3" generated="true" ccm_transition="2"
dc_uuid="cefdb15e-c6ca-437f-86c9-017c6a122b8c" epoch="39"
num_updates="750" cib-last-written="Thu Nov 8 12:20:35 2007">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-symmetric_cluster"
name="symmetric_cluster" value="true"/>
<nvpair id="cib-bootstrap-options-no_quorum_policy"
name="no_quorum_policy" value="stop"/>
<nvpair name="default_resource_stickiness" id="cib-
bootstrap-options-default_resource_stickiness" value="0"/>
<nvpair id="cib-bootstrap-options-
default_resource_failure_stickiness"
name="default_resource_failure_stickiness" value="0"/>
<nvpair name="stonith_enabled" id="cib-bootstrap-options-
stonith_enabled" value="False"/>
<nvpair id="cib-bootstrap-options-stonith_action"
name="stonith_action" value="reboot"/>
<nvpair id="cib-bootstrap-options-stop_orphan_resources"
name="stop_orphan_resources" value="true"/>
<nvpair id="cib-bootstrap-options-stop_orphan_actions"
name="stop_orphan_actions" value="true"/>
<nvpair id="cib-bootstrap-options-remove_after_stop"
name="remove_after_stop" value="false"/>
<nvpair id="cib-bootstrap-options-short_resource_names"
name="short_resource_names" value="true"/>
<nvpair id="cib-bootstrap-options-transition_idle_timeout"
name="transition_idle_timeout" value="5min"/>
<nvpair id="cib-bootstrap-options-default_action_timeout"
name="default_action_timeout" value="5s"/>
<nvpair id="cib-bootstrap-options-is_managed_default"
name="is_managed_default" value="true"/>
<nvpair id="cib-bootstrap-options-last-lrm-refresh"
name="last-lrm-refresh" value="1193827831"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="cefdb15e-c6ca-437f-86c9-017c6a122b8c" uname="sc430"
type="normal"/>
<node id="93f80087-d228-4739-9bc4-757c94cddb0e" uname="av"
type="normal"/>
</nodes>
<resources>
<group id="group_1">
<primitive class="ocf" id="IPaddr_192_168_1_251"
provider="heartbeat" type="IPaddr">
<operations>
<op id="IPaddr_192_168_1_251_mon" interval="5s"
name="monitor" timeout="5s"/>
</operations>
<instance_attributes id="IPaddr_192_168_1_251_inst_attr">
<attributes>
<nvpair id="IPaddr_192_168_1_251_attr_0" name="ip"
value="192.168.1.251"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="ocf" id="apache2_2" provider="heartbeat"
type="apache2">
<operations>
<op id="apache2_2_mon" interval="120s" name="monitor"
timeout="60s"/>
</operations>
<instance_attributes id="apache2_2_instance_attrs">
<attributes>
<nvpair id="apache2_2_target_role" name="target_role"
value="started"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="lsb" type="dhcp3-server"
provider="heartbeat" id="dhcp3_server_1">
<instance_attributes id="dhcp3_server_1_instance_attrs">
<attributes>
<nvpair name="target_role"
id="dhcp3_server_1_target_role" value="started"/>
</attributes>
</instance_attributes>
</primitive>
<instance_attributes id="group_1_instance_attrs">
<attributes>
<nvpair id="group_1_target_role" name="target_role"
value="started"/>
</attributes>
</instance_attributes>
</group>
<group id="group_2">
<instance_attributes id="group_2_instance_attrs">
<attributes/>
</instance_attributes>
<primitive class="ocf" type="IPaddr" provider="heartbeat"
id="IPaddr_192_168_1_250">
<instance_attributes
id="IPaddr_192_168_1_250_instance_attrs">
<attributes>
<nvpair id="4c346926-9ba8-491f-ae0a-8b9edbd3ba81"
name="ip" value="192.168.1.250"/>
</attributes>
</instance_attributes>
<operations>
<op id="74d9c779-4dea-40cb-a877-fb211b3ba5ef"
name="monitor" interval="5s" timeout="5s"/>
</operations>
</primitive>
</group>
</resources>
<constraints>
<rsc_location id="rsc_location_group_1" rsc="group_1">
<rule id="prefered_location_group_1" score="100">
<expression attribute="#uname"
id="prefered_location_group_1_expr" operation="eq" value="av"/>
</rule>
</rsc_location>
<rsc_location id="rsc_location_group_2" rsc="group_2">
<rule id="prefered_rsc_location_group_2" score="100">
<expression attribute="#uname" id="51d95a07-4c3c-466e-
b99c-15818ee9c36d" operation="eq" value="sc430"/>
</rule>
</rsc_location>
</constraints>
</configuration>
</cib>
--
Best regards,
Artur.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems