Comment 13 for bug 1888256

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hi Peter,

This is correct what You are saying. In code it's in https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L452 - neutron will always allocate IPv6 address from such SLAAC subnet if it's not router port.
And in Your workflow, first port is created and it's not router port yet so it has assigned such IPv6 address. Later this port is attached to the router but it already have this IPv6 address allocated.

I understand Your use case but I'm not sure what would be the best way to address it.

For sure to workaround this issue You can plug IPv4 subnet to the router directly. So it will then not allocate IP from this IPv6 subnet. But that means that it will use always IP address defined as gateway_ip in the subnet.