Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

Basic 2-node floating IP setup

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


marcus at synchromedia

Dec 1, 2009, 12:25 PM

Post #1 of 3 (1425 views)
Permalink
Basic 2-node floating IP setup

I'm trying to set up HA on an ubuntu cluster. The docs are fairly comprehensive, but I still can't make sufficient sense out of them or find any sufficiently matching examples.
My scenario is pretty standard - two nodes running pound and HA managing two floating IPs between the two. I'm using the stock Ubuntu 2.1.4 package with an HA 1.0 style config. The main thing I can't quite figure out is exactly what to do with the floating IPs. As far as I can see, the floating IPs are purely resources to be shared by my nodes and as such are not nodes themselves, and don't need to appear in ha.cf. Having said that, I have use of another HA config done by someone else that lists a floating IP as a node and ucast, and it works fine, which has me confused.

Say that my two nodes are 192.158.1.1 and 192.168.1.2, call them www1 and www2, and my floating IPs are 192.168.1.3 and 192.168.1.4.

So far my ha.cf looks like this:

node www1 www2
ucast eth0 192.158.1.1
ucast eth0 192.158.1.2
deadtime 5
deadping 5
debug 0

and haresources looks like this:

www1 192.158.1.3
www1 192.158.1.4

I've added this to my /etc/sysctl.conf, which was apparently necessary to allow the floating IPs to exist:
net.ipv4.ip_nonlocal_bind=1

Does all that look right? Anything I've missed? Do the floating IPs need to appear in ha.cf as ucast lines (like my other setup)? Is my other setup wrong?

Thanks,

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info [at] han CRM solutions
marcus [at] synchromedia | http://www.synchromedia.co.uk/


_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


david.lang at digitalinsight

Dec 1, 2009, 2:20 PM

Post #2 of 3 (1390 views)
Permalink
Re: Basic 2-node floating IP setup [In reply to]

On Tue, 1 Dec 2009, Marcus Bointon wrote:

> I'm trying to set up HA on an ubuntu cluster. The docs are fairly comprehensive, but I still can't make sufficient sense out of them or find any sufficiently matching examples.
> My scenario is pretty standard - two nodes running pound and HA managing two floating IPs between the two. I'm using the stock Ubuntu 2.1.4 package with an HA 1.0 style config. The main thing I can't quite figure out is exactly what to do with the floating IPs. As far as I can see, the floating IPs are purely resources to be shared by my nodes and as such are not nodes themselves, and don't need to appear in ha.cf. Having said that, I have use of another HA config done by someone else that lists a floating IP as a node and ucast, and it works fine, which has me confused.
>
> Say that my two nodes are 192.158.1.1 and 192.168.1.2, call them www1 and www2, and my floating IPs are 192.168.1.3 and 192.168.1.4.
>
> So far my ha.cf looks like this:
>
> node www1 www2

I thought you needed a different node line for each server

node www1
node www2

> ucast eth0 192.158.1.1
> ucast eth0 192.158.1.2
> deadtime 5
> deadping 5
> debug 0
>
> and haresources looks like this:
>
> www1 192.158.1.3
> www1 192.158.1.4

unless you have a specific reason to allow the two IP addresses to exist on two
different machines you should put them both in the same line

www1 182.158.1.3 192.158.1.4

> I've added this to my /etc/sysctl.conf, which was apparently necessary to allow the floating IPs to exist:
> net.ipv4.ip_nonlocal_bind=1

this isn't needed to let floating IPs exist, but it is needed to let software
startup that wants to use these IP addresses when the box isn't active.

> Does all that look right? Anything I've missed? Do the floating IPs need to
> appear in ha.cf as ucast lines (like my other setup)? Is my other setup wrong?

other than the nodes above, this looks reasonable.

what I am currently using is

keepalive 2
deadtime 10
udpport 1107
bcast eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7
node primary
node backup
debugfile /var/log/ha-debug
logfile /var/log/ha-log
auto_failback off
apiauth cl_status gid=haclient

this is using udp broadcase instead of unicast

you may want to add debugfile and logfile options, then if things don't work
look at what those files have to say

David Lang

> Thanks,
>
> Marcus
>
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


marcus at synchromedia

Dec 2, 2009, 2:21 AM

Post #3 of 3 (1392 views)
Permalink
Re: Basic 2-node floating IP setup [In reply to]

On 2 Dec 2009, at 15:18, David Lang wrote:

> I thought you needed a different node line for each server
>
> node www1
> node www2

Docs say you can: http://www.linux-ha.org/ha.cf#node

> unless you have a specific reason to allow the two IP addresses to exist on two
> different machines you should put them both in the same line
>
> www1 182.158.1.3 192.158.1.4

OK.

>> I've added this to my /etc/sysctl.conf, which was apparently necessary to allow the floating IPs to exist:
>> net.ipv4.ip_nonlocal_bind=1
>
> this isn't needed to let floating IPs exist, but it is needed to let software
> startup that wants to use these IP addresses when the box isn't active.

Ah, ok, I knew it was something like that.

heartbeat didn't re-read config with a simple restart, needed a full stop/start. After doing this, both floating IPs are up and it seems to be working!

Thanks for your help,

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info [at] han CRM solutions
marcus [at] synchromedia | http://www.synchromedia.co.uk/


_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.