[openstack-dev] [neutron] Update_port can not remove allocation from auto-addressed subnets
carl at ecbaldwin.net
Fri May 20 16:41:25 UTC 2016
On Fri, May 20, 2016 at 6:06 AM, Pavel Bondar <pbondar at infoblox.com> wrote:
> Currently using update_port workflow user can not remove ip addresses from
> auto-addressed subnets (SLAAC). It prevents me from implementing complete
> fix for .
> Typically for removing ip address from port, 'fixed_ips' list is updated and
> ip address is cleaned up from it.
> But for auto-addressed subnets if ip address is removed from 'fixed_ips',
> port_update is called, but SLAAC ip are not removed because of .
> This area was significantly reworked during liberty, but the same
> behavior is
> preserved at least from kilo .
> To make subnet deletion to comply with IPAM interface  any ip address
> deallocation has to be done via ipam interface (update_port), but
> currently skips deallocation of SLAAC addresses.
Just reiterating: This is tough because the subnet is not yet
deleted, it is about to be deleted. So, update port doesn't know that
it should release the IPs because the subnet is going away. It thinks
it should keep them because of the policy for each port to have an IP
on all auto-address subnets.
I also thought of calling IPAM directly from the delete subnet code.
However, this could be problematic because we really want this to go
through the update port code path so that the port is properly updated
with the new set of addresses. I have a feeling that the port update
path might just reallocate the address for the subnet because of the
> So I am looking for advice about a way to allow deallocation of SLAAC
> addresses via update_port.
> I see several possible solutions, but they are not ideal, so please let
> me know
> if you see a better solution:
> - Add additional parameter like 'allow_slaac_deletion' to update_port
> and pass it through
> _get_changed_ips_for_port to alternate behavior in . It involves changing
> parameters for API exposed method update_port, so not sure if it can be
> - Another way is to introduce new state for 'fixed_ips' list. Currently
> it can
> have 'subnet_id' and 'ip_address' as keys. We could add new key like
> 'delete_subnet_id' to force delete allocations for slaac subnets. This way
> there is no need to update parameters for bunch of methods.
I guess I prefer something like the latter: an attribute in fixed ips
communicating that certain auto-address subnets are going away and
their addresses should be deallocated. Maybe someone else will have
another idea. I can't think of anything better yet.
> Please share your thoughts about the ways to fix it.
>  https://bugs.launchpad.net/neutron/+bug/1564335
More information about the OpenStack-dev