[Csync2] Csync2 using redundant network
mkirank at gmail.com
mkirank at gmail.com
Fri May 15 00:00:38 CEST 2009
Hi,
We are experimenting using csync2 along with DRBD to setup a failover
machine and have the following setup
The machines are connected to each other using different networks on each
of the interfaces, we use quagga to do the dynamic routing
host foo
eth0: 192.168.0.1
eth1: 192.168.0.5
lo:1 192.168.0.9 (DRBD)
lo:2 192.168.3.1 (Virtual IP to be taken over by on failover)
host bar
eth0: 192.168.1.1
eth1: 192.168.1.5
lo:1 192.168.1.9 (DRBD)
the /etc/hosts file in bar is
foo 192.168.0.1
foo 192.168.0.5
foo 192.168.0.9
csync2.cfg looks like this
group mygroup
{
host foo bar;
key /etc/csync2.key_mygroup;
include /home/;
auto none;
}
The problem I am having is that when we down the eth0 on foo and do a
csync2 (on foo), our network routing takes care of reaching bar, but bar
looks at the IP and it gets 192.168.0.5 and since it is different from
192.168.0.1 the connection is refused, I have looked at the csync2 source
and am thinking of the following solutions
1. In daemon.c in case A_HELLO: we can remove the check
(!memcmp(hp->h_addr, &peername.sin_addr, hp->h_length)) and since its a
private network we do not have security issues
2. alternatively we loop through the hp->h_addr_list and verify if any of
the address matches the address we get.
What am I missing here, Is there an easy way of doing this without having
to modify the code ?.
Thanks,
Kiran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linbit.com/pipermail/csync2/attachments/20090514/d1fa0899/attachment.htm
More information about the Csync2
mailing list