Can I assign a floating IP to multiple VMs (same IP address)?

I have a need to setup multiple addresses for the watchdog software in pgpool.
Similar to running my own load balancer.

As a result, I have tried multiple methods of integrating the eth0:1 interface..
If I use static IP addresses then I get them on the VM, but cannot associate a floating IP with them properly.
Only a dhcp address shows up in Horizon or nova list

After much beating up on this, I have been able to do the following:
Get a DHCP address onto eth0 (different for each VM) and a floating address to each one.
These are addressable from anywhere.
I also was able to get a static address (same one) onto eth0:1 of both VMs.
It is addressable from the inside only...

Now, the sticky part.....Since my software (pgpool) manages it's own VIP, I do not want to use the load balancer in Openstack. Plus, since this works as an active/passive type server, I obviously cannot have the servers bouncing to each other.

I am looking for a reference to assigning a floating IP to 2 different instances, or can it be tunneled to the address which is on both ?

3 answers

Since floating IPs are only some NAT rules inside namespaces iptables, I don't think you can do this from the instances. You will need an exteranal mechanism to watch the active machine and if not responding, to remove the floating IP from that instance and assign it to the other one.