Ask Your Question
0

can I assign my own ip after the instance boots up.

asked 2014-11-10 17:27:44 -0500

nakul gravatar image

Basically I want to achieve the following:

1) I have a 2 vm instances
2) These both vms are identical except one is active and other is standby.
3) I need both of this to have the same Ip except that the standby vm is not using this IP.
4) When a switch over happens I want the standby to take over the Ip the active was using and now the old active vm becomes standby now.

Thanks, Nakul

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2014-11-10 22:32:31 -0500

pramdoyal gravatar image

HI Nakul,

I do understand that you want a to achieve a HA service and this can be done with keepalived.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Load_Balancer_Administration/s1-lvs-block-diagram-VSA.html#s2-lvs-keepalived-haproxy-VSA (https://access.redhat.com/documentati...)

Thanks Prakash

edit flag offensive delete link more
1

answered 2014-11-11 00:07:12 -0500

SamYaple gravatar image

updated 2014-11-11 00:08:39 -0500

Hello, yes! This is perfectly doable with neutron. I am not sure about nova-network (highly unlikely from what I understand about it).

You'll want to look at neutron port-create and neutron port-update commands.

So the procedure looks like the following (please note, the commands are from my memory and may not work in a copy/paste fashion):

Assumptions:

  • Two existing instances with ip_addresses of 192.168.1.11 and 192.168.1.12 respectively
  • One VIP address of 192.168.1.250 not currently in use by any instance or device

Steps to run keepalived:

  • nova list and find the ip address associated with that instance
  • neutron port-list | grep $ip_address and find the port_uuid assciated with that ip_address
  • neutron port-update $port_uuid --allowed-address-pairs type=dict list=true ip_address='192.168.1.250'
  • Repeat the above steps for each instance you wish to be able to talk with the VIP address

At this point you have setup the rules to allow the VIP address to talk out of each instance. However, this VIP address is not assigned with DHCP, it is entirely up to you to manage assigning and unassigning it; Only the iptables rules were created.

You can then use keepalived or some other method to implement your active/passive configuration.

edit flag offensive delete link more
0

answered 2014-11-10 23:06:15 -0500

Using HAProxy and Keepalived packages (services) we can achieve this.

Neutron Load Balance as a Service internally uses HAProxy.

So you can configure Neutron LBaaS to achieve your goals.

edit flag offensive delete link more

Comments

Thanks for your answer but can you please elaborate or point me to somewhere which details how to do this?

nakul gravatar imagenakul ( 2014-11-10 23:22:04 -0500 )edit

Sure... Below is the link go through that you will get some idea. If not bug me again.

https://wiki.openstack.org/wiki/Neutr...


TechPatron answers@techpatron.co.in

TechPatron gravatar imageTechPatron ( 2014-11-11 00:47:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-11-10 17:27:44 -0500

Seen: 104 times

Last updated: Nov 11 '14