[openstack-dev] [nova] [neutron] What the behavior of AddFixedIp API should be?

Matt Riedemann mriedemos at gmail.com
Mon Mar 27 15:36:09 UTC 2017


On 3/27/2017 7:23 AM, Rui Chen wrote:
> Hi:
>
>     A question about nova AddFixedIp API, nova api-ref[1] describe the
> API as "Adds a fixed IP address to a server instance, which associates
> that address with the server.", the argument of API is network id, so if
> there are two or more subnets in a network, which one is lucky to
> associate ip address to the instance? and the API behavior is always
> consistent? I'm not sure.
>     The latest code[2] get all of the instance's ports and subnets of
> the specified network, then loop them, but it return when the first
> update_port success, so the API behavior depends on the order of subnet
> and port list that return by neutron API. I have no idea about what
> scenario we should use the API in, and the original design, anyone know
> that?
>
> [1]: https://developer.openstack.org/api-ref/compute/#add-associate-fixed-ip-addfixedip-action
> [2]: https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L1366
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

I wondered about this API implementation myself awhile ago, see this bug 
report for details:

https://bugs.launchpad.net/nova/+bug/1430512

There was a related change for this from garyk:

https://review.openstack.org/#/c/163864/

But that was abandoned.

I'm honestly not really sure what the direction is here. From what I 
remember when I reported that bug, this was basically a feature-parity 
implementation in the compute API for the multinic API with 
nova-network. However, I'm not sure it's very usable. There is a Tempest 
test for this API, but I think all it does is attach an interface and 
make sure that does not blow up, it does not try to use the interface to 
ssh into the guest, for example.

-- 

Thanks,

Matt



More information about the OpenStack-dev mailing list