Associating Floating IP with a port can result in duplicate Floating IPs, due to the original FIP not being removed from the SNAT namespace.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Undecided
|
Unassigned |
Bug Description
Associating Floating IP with a port can result in duplicate Floating IPs, due to the original FIP not being removed from the SNAT namespace. This is likely specific to using DVR.
We're creating a Heat stack containing, among other things, a Floating IP and a Port.
head_
properties:
floating_
port_id:
type: OS::Neutron:
head_
properties:
network_id:
port_
replaceme
security_
- get_resource: head_sec_group
type: OS::Neutron::Port
During this initial stack creation, we are not creating any VMs. So, the port is not attached to any device.
It looks like because of those two lines in floating-ip definition
port_id:
after the initial stack creation the Floating IP gets allocated in a SNAT namespace of one of the hypervisors, and starts to respond to ARP requests.
However, as soon as we update this stack, adding a VM, and making the above mentioned port part of a VM, something weird happens. As expected, Neutron then allocates that FIP on the hypervisor hosting the VM (as expected, we're running DVR), however Neutron fails to remove the FIP it had created initially in the SNAT namespace, after the initial stack creation.
This results in FIP being present on two different hypervisors, causing duplicate ARP replies (one MAC being in the SNAT namespace, the other in the floating ip namespace), and obvious connectivity issues.
Note that the issues does not appear if the initial FIP happens to land in the SNAT namespace of the same hypervisors which will later (after stack update) also host the VM.
Simple, confirmed, workaround is to NOT include those two lines during the initial heat stack creation, and only include them in the stack update during which we add the VM.
port_id:
Not including those lines initially in the stack results in Neutron not allocating the FIP anywhere.
Environment: Neutron Pike (11.0.5), with DVR, OVS, VLAN-based isolation.
description: | updated |
Changed in neutron: | |
status: | Incomplete → New |
Hi Piotrrr,
The behaviour of creating the FIP in a snat namespace is expected. What is not expected is that the FIP is not migrated to the corresponding compute when the port is associated with a VM. There is a previously filed bug that describes the same situation as yours (without the heat templates): https:/ /bugs.launchpad .net/neutron/ +bug/1718788. It was fixed with this patch https:/ /review. openstack. org/#/q/ I6b1f3ffc3c3336 035632f6a82d3a8 7b3be57b403 during the Queens cycle. As you can see, it was backported to Pike. Do you have this fix?
Marking incomplete until we hear back from submitter