[Linux-HA] Re: 4 nodes,
2 clusters and 3 groups - preference or colocation
Andrew Beekhof
beekhof at gmail.com
Thu Oct 12 08:48:59 MDT 2006
On 10/12/06, Alex and Gill Strachan <asgks at yahoo.com> wrote:
> Thank you Andrew for helping.
>
> I compiled the software on one of the nodes, sorry I am alot more comfortable using rpm ! Made this node the dc. This still didn't stop the group 3 from running on only the 3a node which is currently running the group.
>
> i.e.
>
> group 3a running on node 3a1
> group 3 will sometimes run on 3a1, or 3a2. At least now it isn't running on a 3b node. !
>
> How can I lock it down to running only on the node which is running 3a ?
>
> The colocation rules used were
> from 3 to 3a; score 100
> from 3 to 3b; score 25
Seriously, the first thing is rename those groups :-)
Then increase the difference between the two scores.
Try:
from 3 to 3a; score 90000
from 3 to 3b; score 10000
if these are the most important constraints in your cluster its
perfectly valid to give them values that are orders of magnitude
higher.
>
> Current cib.xml file- it is a bit of a mess at the moment !!
>
>
> <cib generated="true" admin_epoch="0" have_quorum="true" num_peers="3" cib_feature_revision="1.3" ccm_transition="9" dc_uuid="4274cf9c-683c-462b-adb0-e86667f446a5" epoch="58" num_updates="1428" cib-last-written="Thu Oct 12 22:10:55 2006">
> <configuration>
> <crm_config>
> <cluster_property_set id="cib-bootstrap-options">
> <attributes>
> <nvpair id="cib-bootstrap-options-symmetric_cluster" name="symmetric_cluster" value="False"/>
> <nvpair id="cib-bootstrap-options-no_quorum_policy" name="no_quorum_policy" value="ignore"/>
> <nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1160635399"/>
> <nvpair id="cib-bootstrap-options-default_resource_stickiness" name="default_resource_stickiness" value="INFINITY"/>
> <nvpair id="cib-bootstrap-options-default_resource_failure_stickiness" name="default_resource_failure_stickiness" value="INFINITY"/>
> <nvpair id="cib-bootstrap-options-default_action_timeout" name="default_action_timeout" value="60"/>
> <nvpair id="cib-bootstrap-options-transition_idle_timeout" name="transition_idle_timeout" value="60"/>
> <nvpair id="cib-bootstrap-options-stonith_enabled" name="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-is_managed_default" name="is_managed_default" value="True"/>
> </attributes>
> </cluster_property_set>
> </crm_config>
> <nodes>
> <node id="b757aece-0e47-41e5-92b7-6a80b4f3eea7" uname="sinfids3a1" type="normal">
> <instance_attributes id="nodes-b757aece-0e47-41e5-92b7-6a80b4f3eea7">
> <attributes>
> <nvpair id="standby-b757aece-0e47-41e5-92b7-6a80b4f3eea7" name="standby" value="off"/>
> <nvpair name="cluster_group" value="sinfids3a" id="1367a8d0-769e-4887-a5c9-7bc6f2867f9f"/>
> </attributes>
> </instance_attributes>
> </node>
> <node uname="sinfids3a2" type="normal" id="ec74bd17-2016-4d32-a694-0f6983121cd9">
> <instance_attributes id="nodes-ec74bd17-2016-4d32-a694-0f6983121cd9">
> <attributes>
> <nvpair name="standby" id="standby-ec74bd17-2016-4d32-a694-0f6983121cd9" value="off"/>
> <nvpair name="cluster_group" value="sinfids3a" id="053d0c0a-4d7e-41ab-b96f-c90f63c4ab2a"/>
> </attributes>
> </instance_attributes>
> </node>
> <node uname="sinfids3b1" type="normal" id="4274cf9c-683c-462b-adb0-e86667f446a5">
> <instance_attributes id="nodes-4274cf9c-683c-462b-adb0-e86667f446a5">
> <attributes>
> <nvpair name="standby" id="standby-4274cf9c-683c-462b-adb0-e86667f446a5" value="off"/>
> <nvpair name="cluster_group" value="sinfids3b" id="24cd99e1-ec88-4cea-b1a1-0a61ba953f50"/>
> </attributes>
> </instance_attributes>
> </node>
> </nodes>
> <resources>
> <primitive id="R3_vip" class="ocf" type="IPaddr" provider="heartbeat">
> <instance_attributes id="R3_vip_instance_attrs">
> <attributes>
> <nvpair id="R3_vip_target_role" name="target_role" value="started"/>
> <nvpair id="624247e4-19f1-4466-a76f-26b9d51f3e40" name="ip" value="128.103.2.10"/>
> </attributes>
> </instance_attributes>
> </primitive>
> <primitive id="R3A_vip" class="ocf" type="IPaddr" provider="heartbeat">
> <instance_attributes id="R3A_vip_instance_attrs">
> <attributes>
> <nvpair id="R3A_vip_target_role" name="target_role" value="started"/>
> <nvpair id="53500695-92f2-405c-93e0-5a4971426e92" name="ip" value="128.103.2.11"/>
> </attributes>
> </instance_attributes>
> </primitive>
> <primitive id="R3B_vip" class="ocf" type="IPaddr" provider="heartbeat">
> <instance_attributes id="R3B_vip_instance_attrs">
> <attributes>
> <nvpair id="R3B_vip_target_role" name="target_role" value="started"/>
> <nvpair id="bad02cfa-eef5-4937-8eb6-7035c780cfb1" name="ip" value="128.103.2.12"/>
> </attributes>
> </instance_attributes>
> </primitive>
> </resources>
> <constraints>
> <rsc_location id="place_R3_vip" rsc="R3_vip">
> <rule id="prefered_place_R3_vip" score="INFINITY"/>
> </rsc_location>
> <rsc_location id="place_R3B_vip" rsc="R3B_vip">
> <rule id="prefered_place_R3B_vip" score="INFINITY">
> <expression attribute="cluster_group" id="f60afa4f-16fe-4fa4-950c-afe2a9348677" operation="eq" value="sinfids3b"/>
> </rule>
> </rsc_location>
> <rsc_colocation id="colocation_R3_R3A" from="R3_vip" to="R3A_vip" score="100"/>
> <rsc_location id="place_R3A_vip" rsc="R3A_vip">
> <rule id="prefered_place_R3A_vip" score="INFINITY">
> <expression attribute="cluster_group" id="adfa1440-e55b-4408-b93a-fccd2a762210" operation="eq" value="sinfids3a"/>
> </rule>
> </rsc_location>
> </constraints>
> </configuration>
> </cib>
>
> ----- Original Message ----
> From: Andrew Beekhof <beekhof at gmail.com>
> To: General Linux-HA mailing list <linux-ha at lists.linux-ha.org>
> Sent: Thursday, 12 October, 2006 4:10:49 PM
> Subject: Re: [Linux-HA] Re: 4 nodes, 2 clusters and 3 groups - preference or colocation
>
> On 10/11/06, Alex and Gill Strachan <asgks at yahoo.com> wrote:
> > Re: 4 nodes, 2 clusters and 3 groups - preference or colocation [In reply to]
> >
> > ---------------------------------
> >
> > On 10/11/06, Alex and Gill Strachan <asgks[at]yahoo.com> wrote:
> > >> 4 nodes, 2 clusters and 3 groups - preference or colocation
> > >>
> > >> How to configure a floating group between the two clusters ?
> >
> > >Why not have 1 four node cluster?
> > They are all in the same HB2 cluster, the 2 nodes cluster have been created using node groups.
>
> ah, you threw me with "4 nodes, 2 clusters"
>
> >
> > >Where resource 3a can only run on 3a1, 3a2
> >
> > Already configured by using Places.
> >
> > >And resource 3b can only run on 3b1, 3b2
> >
> > I split it up because we are using DRBD to link the local storage between the two nodes in a cluster and have an Oracle database running.
> > i.e.
> > Group 3a has DRBD/Oracle/.. running on either 3a1, 3a2
> > Group 3b has DRBD/Oracle/.. running on either 3b1, 3b2
> >
> > Group 3 needs to run on same cluster as 3a, then 3b if 3a (nodes 3a1,3a2) are not available.
> >
> >
> >
> > >Then (as long as you're running the latest from crm-stable) you have
> > >two colocation constraints...
> >
> > >3 runs with 3a (constraint score = N)
> > >3 runs with 3b (constraint score = M, where M < N)
> > I'll try this, I did colocate 3 with 3a. When I stopped 3 it also stopped 3a; this is a behaviour which is not required.
>
> right. what you're after is something called "weak collocation" which
> is quite new and still mostly only in my tree:
> http://hg.beekhof.net/crm-stable
>
> once you're running that code, just specify a score < 1000000 for the
> rsc_colocation constraint and it should do what you want.
>
> >
> >
> >
> > >Or, save yourself some cash and have a three node cluster (ie. a
> > >shared backup node)
> > >Where resource 3a can only run on nodes 3a and 3c
> > >And resource 3b can only run on nodes 3b and 3c
> >
> > >>
> > >>
> > >> I have tried colocation but this locks the floating group to one >>cluster, and when it is stopped the cluster stops. New to HB2, >>recently upgraded from HB1 due to the 4 node requirement.
> > >>
> > >> Summary:
> > >>
> > >> 4 nodes, 2 clusters - each with two nodes and a third resource >>group to move between clusters.
> > >>
> > >> Nodes:
> > >> 3a1 | configured as a 2 node resource cluster to run group "3a"
> > >> 3a2 |
> > >>
> > >> 3b1 | configured as a 2 node resource cluster to run group "3b"
> > >> 3b2 |
> > >>
> > >> Groups:
> > >> 3 Floats between the cluster groups on a preference basis
> > >> 3a runs on either 3a1, 3a2
> > >> 3b runs on either 3b1, 3b2
> > >>
> > >>
> > >> Group 3a cannot run on the 3b clusters (3b1, 3b2) and vice versa. >>This is working with the config files below.
> > >>
> > >>
> > >> The third group "3" needs to:
> > >> On initial start run on the 3a cluster and on the host which is >>currently running the group.
> > >> e.g. group 3a active, runing on node 3a1 then group 3 runs on >>3a1
> > >> Node 3a1 fails
> > >> e.g. groups 3a moves to node 3a2 then group 3 move to node 3a2
> > >> Node 3a2 fails also (not a good day !)
> > >> e.g. group 3a fails then group 3 runs on 3b1 (if node 3b1 is >>currently running group 3b)
> > >> ...
> > >>
> > >> Any suggestions or example cib.xml files would be very welcome.
> > >>
> > >>
> > >> Alex
> > >>
> > >
> > > (I realise it is missing node 3b2 - trying to confirm the concept is possible with HB2)
> > >
> > > OS - RHES4
> > > HB2 - 2.0.7-1 (rpm's from centos)
> > >
> > >
> > > ha.cf
> > > =====
> > >
> > > auto_failback off # Try and keep resources on their "preferred" hosts
> > > bcast eth0 # Broadcast heartbeats on eth0 and eth1 interfaces
> > > keepalive 2 # Send one heartbeat every 2 seconds
> > > warntime 5 # Time in seconds before issuing a
> > > # "late heartbeat" warning in the logs.
> > > deadtime 10 # Node is pronounced dead after 30 seconds.
> > > initdead 20 # With some configurations, the network takes some time
> > > # to start working after a reboot. This is a separate
> > > # "deadtime" to handle that case. It should be at least
> > > # twice the normal deadtime.
> > > node sinfids3a1 sinfids3a2 sinfids3b1 # List of cluster members (uname -n).
> > > # new v2 stuff
> > > crm yes # activate Cluster Resource Manager(CRM)
> > > use_logd yes # config file /etc/logd.cf
> > > traditional_compression false
> > >
> > >
> > > cib.xml
> > > =======
> > >
> > > <cib generated="true" admin_epoch="0" have_quorum="true" num_peers="3" cib_feature_revision="1.3" epoch="30" num_updates="589" cib-last-written="Wed Oct 11 16:50:36 2006" ccm_transition="3" dc_uuid="b757aece-0e47-41e5-92b7-6a80b4f3eea7">
> > > <configuration>
> > > <crm_config>
> > > <cluster_property_set id="cib-bootstrap-options">
> > > <attributes>
> > > <nvpair id="cib-bootstrap-options-symmetric_cluster" name="symmetric_cluster" value="False"/>
> > > <nvpair id="cib-bootstrap-options-no_quorum_policy" name="no_quorum_policy" value="ignore"/>
> > > <nvpair name="last-lrm-refresh" id="cib-bootstrap-options-last-lrm-refresh" value="1160541919"/>
> > > <nvpair id="cib-bootstrap-options-default_resource_stickiness" name="default_resource_stickiness" value="INFINITY"/>
> > > <nvpair id="cib-bootstrap-options-default_resource_failure_stickiness" name="default_resource_failure_stickiness" value="INFINITY"/>
> > > </attributes>
> > > </cluster_property_set>
> > > </crm_config>
> > > <nodes>
> > > <node id="b757aece-0e47-41e5-92b7-6a80b4f3eea7" uname="sinfids3a1" type="normal">
> > > <instance_attributes id="nodes-b757aece-0e47-41e5-92b7-6a80b4f3eea7">
> > > <attributes>
> > > <nvpair id="standby-b757aece-0e47-41e5-92b7-6a80b4f3eea7" name="standby" value="off"/>
> > > <nvpair name="cluster_group" value="sinfids3a" id="1367a8d0-769e-4887-a5c9-7bc6f2867f9f"/>
> > > </attributes>
> > > </instance_attributes>
> > > </node>
> > > <node id="ec74bd17-2016-4d32-a694-0f6983121cd9" uname="sinfids3a2" type="normal">
> > > <instance_attributes id="nodes-ec74bd17-2016-4d32-a694-0f6983121cd9">
> > > <attributes>
> > > <nvpair id="standby-ec74bd17-2016-4d32-a694-0f6983121cd9" name="standby" value="off"/>
> > > <nvpair name="cluster_group" value="sinfids3a" id="053d0c0a-4d7e-41ab-b96f-c90f63c4ab2a"/>
> > > </attributes>
> > > </instance_attributes>
> > > </node>
> > > <node id="4274cf9c-683c-462b-adb0-e86667f446a5" uname="sinfids3b1" type="normal">
> > > <instance_attributes id="nodes-4274cf9c-683c-462b-adb0-e86667f446a5">
> > > <attributes>
> > > <nvpair id="standby-4274cf9c-683c-462b-adb0-e86667f446a5" name="standby" value="off"/>
> > > <nvpair name="cluster_group" value="sinfids3b" id="24cd99e1-ec88-4cea-b1a1-0a61ba953f50"/>
> > > </attributes>
> > > </instance_attributes>
> > > </node>
> > > </nodes>
> > > <resources>
> > > <group id="group_sinfids3">
> > > <instance_attributes id="group_sinfids3_instance_attrs">
> > > <attributes>
> > > <nvpair name="target_role" id="group_sinfids3_target_role" value="stopped"/>
> > > </attributes>
> > > </instance_attributes>
> > > <primitive class="ocf" type="IPaddr" provider="heartbeat" id="resource_sinfids3_vip">
> > > <instance_attributes id="resource_sinfids3_vip_instance_attrs">
> > > <attributes>
> > > <nvpair name="target_role" id="resource_sinfids3_vip_target_role" value="started"/>
> > > <nvpair id="9e54bba2-7007-4892-840b-e069b64b5d10" name="ip" value="128.103.2.10"/>
> > > </attributes>
> > > </instance_attributes>
> > > </primitive>
> > > </group>
> > > <group id="group_sinfids3a">
> > > <instance_attributes id="group_sinfids3a_instance_attrs">
> > > <attributes>
> > > <nvpair name="target_role" id="group_sinfids3a_target_role" value="started"/>
> > > </attributes>
> > > </instance_attributes>
> > > <primitive class="ocf" type="IPaddr" provider="heartbeat" id="resource_sinfids3a_vip">
> > > <instance_attributes id="resource_sinfids3a_vip_instance_attrs">
> > > <attributes>
> > > <nvpair name="target_role" id="resource_sinfids3a_vip_target_role" value="started"/>
> > > <nvpair id="6c1a9dcc-435d-4cbf-b741-7b44068d0ae7" name="ip" value="128.103.2.11"/>
> > > </attributes>
> > > </instance_attributes>
> > > </primitive>
> > > </group>
> > > <group id="group_sinfids3b">
> > > <instance_attributes id="group_sinfids3b_instance_attrs">
> > > <attributes>
> > > <nvpair id="group_sinfids3b_target_role" name="target_role" value="started"/>
> > > </attributes>
> > > </instance_attributes>
> > > <primitive class="ocf" type="IPaddr" provider="heartbeat" id="resource_sinfids3b_vip">
> > > <instance_attributes id="resource_sinfids3b_vip_instance_attrs">
> > > <attributes>
> > > <nvpair name="target_role" id="resource_sinfids3b_vip_target_role" value="started"/>
> > > <nvpair id="421331f3-91a8-4e21-8d1c-920e620f14b6" name="ip" value="128.103.2.12"/>
> > > </attributes>
> > > </instance_attributes>
> > > </primitive>
> > > </group>
> > > </resources>
> > > <constraints>
> > > <rsc_location id="place_sinfids3a" rsc="group_sinfids3a">
> > > <rule id="prefered_place_sinfids3a" score="INFINITY" boolean_op="or">
> > > <expression attribute="cluster_group" operation="eq" value="sinfids3a" id="c4947208-d60b-481e-a852-286879f827da"/>
> > > </rule>
> > > </rsc_location>
> > > <rsc_location id="place_sinfids3b" rsc="group_sinfids3b">
> > > <rule id="prefered_place_sinfids3b" score="INFINITY" boolean_op="or">
> > > <expression attribute="cluster_group" operation="eq" value="sinfids3b" id="51076dc6-9e96-4e3f-a452-d39669754db1"/>
> > > </rule>
> > > </rsc_location>
> > > <rsc_location id="place_sinfids3" rsc="group_sinfids3">
> > > <rule id="prefered_place_sinfids3" score="100"/>
> > > </rsc_location>
> > > </constraints>
> > > </configuration>
> > > </cib>
> > >
> > >
> > >
> > > ---------------------------------
> > > On Yahoo!7
> > > Fuel Price Watch: Find the cheapest petrol in your area
> > > _______________________________________________
> > > 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
> > >
> > _______________________________________________
> > 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
> > Send instant messages to your online friends http://au.messenger.yahoo.com
> > _______________________________________________
> > 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
> >
> _______________________________________________
> 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
>
>
>
>
>
>
>
>
>
>
>
> ____________________________________________________
> On Yahoo!7
> Messenger: Plug-in the fun with handy plug-ins
> http://au.messenger.yahoo.com
>
> _______________________________________________
> 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