How can I associate a port created by LBaaS to a nova instance?

asked 2014-02-07 07:24:00 -0600

Matt G gravatar image

I am writing a Neutron LBaaS driver that, when a new VIP is created, launches a Nova instance that is essentially a software-based load-balancer virtual appliance. The core LBaaS driver creates a Neutron port and associates it with an IP address; I want to assign this same port/IP to the Nova LB-VA instance, but when I do so (using the nics={"port-id": <port_id>} parameter in the novaclient.servers.create() call), although it seems to work (all the database entries look right, a floating IP associated with the port shows up as associated with the VA when running "nova list" etc.), when I log on to the VA console the network is not configured (no address on eth0) and my cloud-init script has not run. I've tried using nics={"port-id": <port_id>, "v4-fixed-ip": <ip> } as well, with the same result. If I omit the "nics" parameter then the VA boots correctly (with an IP address, cloud-init script has run, can SSH to the instance's associated floating IP) but obviously with a different IP address to that specified by the VIP object.

Is it possible to use this port/IP for the VA Nova instance? If not, I have an LBaaS VIP object that is associated with a port/IP address which isn't actually the one the load-balancer service is listening on.

edit retag flag offensive close merge delete