[Linux-HA] giving up resource when no connection is available
Andrew Beekhof
beekhof at gmail.com
Mon Nov 27 02:32:09 MST 2006
On 11/25/06, Jaroslav Libák <jarol1 at seznam.cz> wrote:
> I'm having problems with setting up heartbeat 2.0.7 to give up IP address after the server looses connectivity. I have 4 virtual servers running in vmware with debian etch. I'm trying to set up 2 servers acting as load balancers to failover 1 IP address.
> The new master node needs to keep the resource when the 2nd node comes up.
>
> This works if I reboot the server or restart the heartbeat daemon, but doesn't work right if I just cut the connectivity by setting up firewall.
>
> If I run
> iptables -A INPUT -i eth2 -j DROP
> iptables -A OUTPUT -o eth2 -j DROP
> iptables -A INPUT -i eth1 -j DROP
> iptables -A OUTPUT -o eth1 -j DROP
>
> to simulate loss of connectivity
actually you're simulating a split-brain scenario without a STONITH device
> then 2. node takes the IP address as expected. Then both nodes have the same IP address and the 1. node doesn't give it up (it is firewalled so no harm done).
> After I run
>
> iptables -F OUTPUT
> iptables -F INPUT
>
> the 2. node gives up the taken IP address and the 1st (which was firewalled) keeps it. This is not what I want. After 2nd node regains connectivity, 1st node has to keep the IP address.
>
> Is there a simple way to achieve this?
http://linux-ha.org/v2/faq/pingd
>
> my ha.cf:
> -----------
> crm yes
> debugfile /var/log/ha-debug
> logfile /var/log/ha-log
> logfacility local0
> keepalive 500ms
> deadtime 5
> warntime 3
> initdead 20
> udpport 694
> bcast eth1
> auto_failback off
> node polaris1
> node polaris2
> ping 147.32.120.53
> debug 1
>
> my cib.xml:
> ----------------
> <cib admin_epoch="0" have_quorum="true" num_peers="2" cib_feature_revision="1.3" generated="true" ccm_transition="2" dc_uuid="4e509307-01f6-4bbd-85ed-e130374da16c" epoch="38" num_updates="311" cib-last-written="Sat Nov 25 22:27:34 2006">
> <configuration>
> <crm_config>
> <cluster_property_set id="cib-bootstrap-options" score="100">
> <attributes>
> <nvpair id="symmetric_cluster" name="symmetric_cluster" value="true"/>
> <nvpair id="default_resource_stickiness" name="default_resource_stickiness" value="INFINITY"/>
> </attributes>
> </cluster_property_set>
> </crm_config>
> <nodes>
> <node id="4e509307-01f6-4bbd-85ed-e130374da16c" uname="polaris2" type="normal"/>
> <node id="849f54a5-c632-465c-a15a-d41bcf5f7c56" uname="polaris1" type="normal"/>
> </nodes>
> <resources>
> <primitive id="ip_resource" class="ocf" type="IPaddr" provider="heartbeat">
> <instance_attributes id="ip_attributes">
> <attributes>
> <nvpair id="pair1" name="ip" value="192.168.217.53"/>
> </attributes>
> </instance_attributes>
> </primitive>
> </resources>
> <constraints/>
> </configuration>
> </cib>
> _______________________________________________
> 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