[Linux-HA] 4 nodes, 2 clusters and 3 groups - preference or colocation

Andrew Beekhof beekhof at gmail.com
Wed Oct 11 07:33:34 MDT 2006


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?
Where resource 3a can only run on 3a1, 3a2
And resource 3b can only run on 3b1, 3b2

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)

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
>


More information about the Linux-HA mailing list