[openstack-dev] [neutron] Update_port can not remove allocation from auto-addressed subnets
Pavel Bondar
pbondar at infoblox.com
Fri May 20 12:06:46 UTC 2016
Hi,
Currently using update_port workflow user can not remove ip addresses from
auto-addressed subnets (SLAAC). It prevents me from implementing complete
fix for [1].
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 [2].
This area was significantly reworked during liberty, but the same
behavior is
preserved at least from kilo [3].
To make subnet deletion to comply with IPAM interface [1] any ip address
deallocation has to be done via ipam interface (update_port), but
update_port
currently skips deallocation of SLAAC addresses.
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
method,
and pass it through
update_port->update_port_with_ips->_update_ips_for_port->
_get_changed_ips_for_port to alternate behavior in [2]. It involves changing
parameters for API exposed method update_port, so not sure if it can be
accepted.
- 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.
Please share your thoughts about the ways to fix it.
[1] https://bugs.launchpad.net/neutron/+bug/1564335
[2]
https://github.com/openstack/neutron/blob/f494de47fcef7776f7d29d5ceb2cc4db96bd1efd/neutron/db/ipam_backend_mixin.py#L435
[3]
https://github.com/openstack/neutron/blob/stable/kilo/neutron/db/db_base_plugin_v2.py#L444
More information about the OpenStack-dev
mailing list