[Linux-HA] Configuring HA
Dan Track
dan.track at gmail.com
Tue Oct 10 05:00:20 MDT 2006
On 10/10/06, Andrew Beekhof <beekhof at gmail.com> wrote:
> On 10/10/06, Dan Track <dan.track at gmail.com> wrote:
> > Hi
> > I'm trying to setup heartbeat 2.0.7 on rhel 4 es and am having some problems.
> >
> > I'm following the instructions on this page:
> >
> > http://www.linux-ha.org/GettingStarted/OneIPAddress
> >
> > I'm having the following problems
> >
> > 1) Both nodes come up with the virtual floating IP once the primary
> > node is restarted. Only one should come up that gets failed over to
> > the other node. ( at least this is how I understand it)
>
> Sounds like the nodes cant communicate. Firewall?
>
> And one of the nodes probably needs to change this line to something else
> ucast eth1 192.168.16.2
>
> They cant both have that ip address :)
>
> > 2) Running the following generated the following error:
> >
> > python /usr/lib/heartbeat/haresources2cib.py /root/haresources.temp >
> > /var/lib/heartbeat/crm/cib.xml
> > cib.xml or cib.xml.sig exist in /var/lib/heartbeat/crm/
> > please remove them before generating new cib.xml
> >
> > Everytime you remove the file the script recreates a blank file and
> > then complains, buit never populates the file.
> >
> > Could someone please help me with the above?
>
> Not unless you include the contents of /root/haresources.temp
>
> Also, you cant use ipfail with a crm-based cluster
>
> > My configuration files are
> >
> > node1: ha.cf
> >
> > logfile /var/log/ha-log
> > logfacility daemon
> > keepalive 1
> > deadtime 10
> > warntime 5
> > initdead 120 # depend on your hardware
> > udpport 694
> > ping 10.11.8.40
> > bcast eth1
> > ucast eth1 192.168.16.2
> > auto_failback off
> > node zhang
> > node quan
> > respawn hacluster /usr/lib/heartbeat/ipfail
> > use_logd yes
> >
> > node2: ha.cf
> > logfile /var/log/ha-log
> > logfacility daemon
> > keepalive 1
> > deadtime 10
> > warntime 5
> > initdead 120 # depend on your hardware
> > udpport 694
> > ping 10.11.8.40
> > bcast eth1
> > ucast eth1 192.168.16.2
> > auto_failback off
> > node zhang
> > node quan
> > respawn hacluster /usr/lib/heartbeat/ipfail
> > use_logd yes
> >
> >
> > If you need anymore info please let me know.
> >
> > Thanks in advance
> > Dan
Hi
Thanks for the advice.
Here's the contents of /root/haresources.temp:
zhang 10.11.8.42
Hope this helps.
I've got an additional issue now. I've just removed the ip entry in
/etc/ha.d/haresources and relied on the cib.xml file. The problem now
is that I can't get the IP to come up. If I start hearbeat no
interface comes up. However if I use the haresources file the
interface does work. I thought in version 2 cib.xml was used intead of
haresources.
Additionally I'm not using crm. How do I confirm that I'm not using it?
Here's my cib.xml file. I produced this by copying your online example
as the python scripts didn't work.:
/var/lib/heartbeat/crm/cib.xml:
<?xml version="1.0" ?>
<cib>
<configuration>
<crm_config>
<nvpair id="transition_idle_timeout"
name="transition_idle_timeout" value="120s"/>
<nvpair id="symmetric_cluster" name="symmetric_cluster"
value="true"/>
<nvpair id="no_quorum_policy" name="no_quorum_policy" value="stop"/>
</crm_config>
<nodes/>
<resources>
<group id="group_1">
<primitive class="ocf" id="IPaddr_1"
provider="heartbeat" type="IPaddr">
<operations>
<op id="1" interval="5s" name="monitor" timeout="5s"/>
</operations>
<instance_attributes>
<attributes>
<nvpair name="ip" value="10.11.8.42"/>
<nvpair name="netmask" value="16"/>
<nvpair name="nic" value="eth0"/>
</attributes>
</instance_attributes>
</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" operation="eq"
value="zhang"/>
</rule>
</rsc_location>
</constraints>
</configuration>
<status/>
</cib>
Thanks in advance
Dan
More information about the Linux-HA
mailing list