Re: a few concepts

Mike McLean <[email protected]>
Newsgroups gmane.linux.redhat.piranha
Organization Red Hat
Message-ID <[email protected]>
mixo wrote:
> 
> I have been  trying to setup failover services for a couple of days (on 
> and off).
> Initially I was using 3 machines, a primary node, a backup node and 1
> real (web) server, and then changed to just having having 2, a primary 
> node and a server.

You seem to be mixing up Piranha's failover service with it's 
load-balancing service.

With a failover service, there are only two nodes.  The primary node 
runs services and the backup node steps in to provide those same 
services should the primary fail.  With failover service the term 'real 
server' is not used.

> What I am trying to do is have a setup where if the web server 
> (wilma.example.com/
> /192.168.1.4) fails, then the primary node 192.168.1.3  takes over.

This would make wilma.example.com your primary node and 192.168.1.3 your 
backup node.

> What am I missing in my setup? Is using private ip's a a bad idea? Do I 
> have to have
> a back up node?

Not necessarily.

> serial_no = 77
> primary = NODE_1_IP
> primary_private = 192.168.1.3
> service = fos
> backup_active = 1
> backup = NODE_2_IP
> backup_private = 192.168.1.1
> heartbeat = 1
> heartbeat_port = 539
> keepalive = 18
> deadtime = 72
> network = direct
> reservation_conflict_action = preempt
> debug_level = NONE
> failover wilma.example.com {
>     address = 192.168.1.4 eth0:8
<snip>
This will set up 192.168.1.3 and 192.168.1.1 as your primary and backup 
piranha nodes respectively.  They will share the virtual ip 192.168.1.4.


> ++++++++++++++++++++++/etc/rc.d/rc.lvs+++++++++++++++++++++++++++++++++++++++ 
> 
> #!/bin/sh
> 
> iptables -t nat -F -v
> echo 1 >/proc/sys/net/ipv4/ip_forward
> modprobe iptable_nat
> iptables -v -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
> ipvsadm -A -t NODE_1_IP:80 -s rr

Ok, there is *no* LVS in a piranha failover service. Furthermore, even 
in a piranha load balancing service, you should let piranha handle the 
ipvsadm commands for you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.