----- Original Message ----- From: "Michael Schwartzkopff" <[EMAIL PROTECTED]>
To: "General Linux-HA mailing list" <[email protected]>
Sent: Tuesday, April 01, 2008 3:03 PM
Subject: Re: [Linux-HA] Setup HA on Openvz


Am Dienstag, 1. April 2008 17:03 schrieb Gary:
I am tring to setup HA in two VE's of OpenVZ.
Inside VE, there are network interfaces: venet0 and venet0:0. venet0:0 has
the real IP. I tried to use venet0:0 in ha.cf like this: bcast=venet0:0

it does not work.

Hi,

the problem is that a virtual machine cannot change its IP address by its own.
As far as I understood OpenVZ this always has to be done by the host with

vzctl set <machine> --ipaddr ....

This os of course a little problem if the virtual machine wants to control it
cluster IP address. Therefor I modified the IPaddr2 resource agent that it
communicates with the host to change its own IP address. In function
add_interface() of the resource agent I added:
echo "101 add 192.168.189.33" | /bin/nc 192.168.189.199 7564

and corresponding:
echo "101 del 192.168.189.33" | /bin/nc 192.168.189.199 7564
in function delete_interface

On the host side (192.168.188.199) I have a server listing on port 7564. The
program vzip.sh is very simple:
#!/bin/bash
read vps operation ip
echo "on " $vps " do " $operation " " $ip >> /tmp/log.log
CMD="/usr/sbin/vzctl set $vps --ip$operation $ip"
echo $CMD >> /tmp/log.log
$CMD

This program is startet by inetd with the following line in inetd.conf:
vzip    stream  tcp     nowait  root    /root/vzip.sh

and
vzip tcp/7564

in /etc/services

I know the is a very rude solution and need much improvement to be
generalized. But it works for me. If there is any interest by others I could
improve it further so more people could use it. Please mail me.

Cheers,

Yes, I am very interested in your setup. I am new to Linux-HA and still struggling to setup it up on OpenVZ. Right now my two VE's (on different host) does not talk to each other. One always think the other one is dead and auto start the resources.

Can you post your sample config files(ha.cf, hareources ...) here?

Thank you very much.

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

Reply via email to