Dear list members,
I'm new to heartbeat and I'm trying to get the following configuration
to work with Linux-HA:
2 firewall nodes (linux, idefix) with at least 2 ip addresses each. One
firewall (linux) should always be master unless it goes down. Then the
slave (idefix) should takeover all virtual ip addresses and if the
primary firewall (linux) comes back again, it should take over all
virtual ip addresses. All virtuall ip addresses should only be started
on the primary node (master).
The configuration on the web seems to be related to version 2.0.8 and
I'm running 2.1.3 where I can't find some settings for the rules and
colocations. Is there an updated docu somewhere?
I found the following examples on the web that would fullfil my
requirements, but I can't find a configuration dialogue to set these
options:
## http://www.linux-ha.org/CIB/Idioms/ColoWithMaster
It is very common to want to have a certain resource run only on a node
which is master for a given resource.
You can either make sure the resource is run on the master, which is the
propably more common approach:
<rsc_order id="ms-drbd0_before_fs0" from="fs0" action="start"
to="ms-drbd0" to_action="promote"/>
<rsc_colocation id="fs0_on_ms-drbd0" to="ms-drbd0" to_role="master"
from="fs0" score="infinity"/>
Translation:
* Start fs0 after ms-drbd0 has been promoted
* Only start fs0 when ms-drbd0 is running as master
##
In the colocation dialogue I don't find any possibility to set the
to_role. If I change the cib.xml file by hand, most times the file is
rebuild from scratch and I have to set up all again. Is there a
possibility to go back to an older cib.xml file which seems to have the
correct information e.g. cib.xml.6543?
The second part that I found is:
##
http://www.linux-ha.org/CIB/Idioms#head-fd1cd00bfc16ebced9f104b8fa14df71
769a3442
Controlling which node becomes master
It is sometimes desirable to preferentially constrain the master
instance of a master/slave resource to run on a particular node or set
of nodes in the cluster.
The CIB snippet below will add prefer the node ace to be master of the
resource ms-drbd1 by 100 points.
<rsc_location id="loc:ms-drbd1_likes_ace" rsc="ms-drbd1">
<rule id="rule:ms-drbd1_likes_ace" role="master" score="100">
<expression attribute="#uname" operation="eq" value="ace"/>
</rule>
</rsc_location>
##
Here I can't find the dialogue where to setup the role for the rule.
Is there also a HOWTO that describes how to setup master slave
configurations (only one node aktive)?
I added my cib.xml to the mail. I tried to get the problem solved by
different locations with different scores, but I don't know if this will
do what it should.
Thank you for your help.
Best regards
Christof
<cib generated="false" admin_epoch="0" epoch="81" num_updates="1" have_quorum="false" ignore_dtd="false" num_peers="0" cib_feature_revision="2.0" cib-last-written="Tue Aug 5 14:34:10 2008">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.3-node: 4a3eac571f442c7cfcefc18fcaad35314460c1f6"/>
<nvpair id="cib-bootstrap-options-symmetric-cluster" name="symmetric-cluster" value="false"/>
<nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1217934331"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="4d09c681-304b-40e6-a7e8-4f9b8c0e8d58" uname="linux" type="normal"/>
<node id="a4c1714a-d165-4380-bd00-2666c8324c93" uname="idefix" type="normal"/>
</nodes>
<resources>
<primitive id="rsc_int_vip" class="ocf" type="IPaddr2" provider="heartbeat">
<meta_attributes id="rsc_int_vip_meta_attrs">
<attributes/>
</meta_attributes>
<instance_attributes id="rsc_int_vip_instance_attrs">
<attributes>
<nvpair id="1005cf11-73d4-4274-8321-e9009d437629" name="ip" value="10.0.1.100"/>
</attributes>
</instance_attributes>
</primitive>
<primitive id="rsc_ext_vip" class="ocf" type="IPaddr2" provider="heartbeat">
<meta_attributes id="rsc_ext_vip_meta_attrs">
<attributes/>
</meta_attributes>
<instance_attributes id="rsc_ext_vip_instance_attrs">
<attributes>
<nvpair id="1ea5bb8c-6e9f-430f-bfb2-5a7fefacd356" name="ip" value="192.168.178.100"/>
</attributes>
</instance_attributes>
</primitive>
</resources>
<constraints>
<rsc_location id="loc:rsc_ext_vip_slave" rsc="rsc_ext_vip">
<rule id="prefered_loc:rsc_ext_vip_slave" score="50">
<expression attribute="#uname" id="8f8d5737-4e8e-4381-9d0e-20b0503c8c97" operation="eq" value="idefix"/>
</rule>
</rsc_location>
<rsc_location id="loc:rsc_int_vip_slave" rsc="rsc_int_vip">
<rule id="prefered_loc:rsc_int_vip_slave" score="50">
<expression attribute="#uname" id="c2848207-d27d-4cfb-a047-9382f538500d" operation="eq" value="idefix"/>
</rule>
</rsc_location>
<rsc_location id="loc:rsc_ext_vip_master" rsc="rsc_ext_vip">
<rule id="prefered_loc:rsc_ext_vip_master" score="100">
<expression attribute="#uname" id="b8813b49-ecd9-44ef-8b57-0f13a231f195" operation="eq" value="linux"/>
</rule>
</rsc_location>
<rsc_location id="loc:rsc_int_vip_master" rsc="rsc_int_vip">
<rule id="prefered_loc:rsc_int_vip_master" score="100">
<expression attribute="#uname" id="8304cb2b-d879-484c-9860-a1879f2a3f50" operation="eq" value="linux"/>
</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