Asymmetric floating IP notifications

Bug #1838403 reported by Björn Hagemeier
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Brian Haley

Bug Description

Dear all,

we are using `oslo_messaging_notifications` configured in Neutron server [1] to
receive updates about floating ip (FIP) associations and disassociations to process
them with an in-house tool. This works well in almost all cases, except one.

The cases that are working:

1) associate FIP to router (event router.create.end, router.update.end)
2) delete router that still has a FIP (router.delete.end)
3) associate FIP to VM
4) disassociate FIP from VM

Now, the interesting case that *does not work* is the deletion of a VM that
still has a FIP associated to it. We would like to have this case covered and
be notified about the disassociation. Is there a way to capture this event
via a notification?

There is one more case that also does not seem to work: when clearing the
gateway of a router ("Clear Gateway" in the Horizon dashboard), I am also
not notified of the FIP being released. However, this happens much less
frequently, so we're not overly worried about it.

We do need the information to update an internal, site-wide database of
registered addresses and responsible contacts. There are solutions that
periodically poll the information from the API and report changes as
compared to the previously recorded state. The notification solution allows
us to update our central DB in a more timely manner.

Thanks for any help and best regards,


tags: added: l3-dvr-backlog
Revision history for this message
Brian Haley (brian-haley) wrote :

Strange, when a port is deleted the floating IP will be dis-associated and two events notifications should happen according to the code in disassociate_floatingips(). Was the port associated with the VM deleted? I haven't tried that locally yet.

Regarding the second issue, trying to clear the gateway when a router has an associated floating IP should generate an error. I just tried this using horizon on got this:

"Error: Unable to clear gateway for router router1. Most possible reason is because the gateway is required by one or more floating IPs"

Can you confirm the version of Neutron you're running? Thanks

Revision history for this message
Björn Hagemeier (b-hagemeier) wrote :
Download full text (5.7 KiB)

Dear Brian,

thanks for your response and consideration of the issue. I did some further
tests again to retrieve the details that are available for each action.

1) When disassociating an FIP from a VM, I get the following:

DEBUG Received event: type floatingip.update.start, payload {'id':
'************************************', 'floatingip': {'port_id': None}}

DEBUG Received event: type floatingip.update.end, payload {'floatingip':
{'router_id': None, 'status': 'ACTIVE', 'description': '', 'tags': [],
'tenant_id': '********************************', 'created_at':
'2018-11-29T12:15:18Z', 'updated_at': '2019-07-31T08:14:08Z',
'floating_network_id': '************************************',
'fixed_ip_address': None, 'floating_ip_address': '',
'revision_number': 70, 'project_id': '********************************',
'port_id': None, 'id': '************************************'}}

2) When deleting a VM that has an FIP associated to it, I get the following event

DEBUG Received event: type port.delete.start, payload {'port_id':

DEBUG Received event: type port.delete.end, payload {'port_id':
'************************************', 'port': {'status': 'ACTIVE',
'binding:host_id': 'hdfc006', 'description': '', 'allowed_address_pairs': [],
'tags': [], 'extra_dhcp_opts': [], 'updated_at': '2019-07-31T07:41:54Z',
'device_owner': 'compute:HDFCloud', 'revision_number': 10,
'port_security_enabled': True, 'binding:profile': {}, 'fixed_ips':
[{'subnet_id': '************************************', 'ip_address':
''}], 'id': '************************************', 'security_groups':
['************************************'], 'device_id':
'************************************', 'name': '', 'admin_state_up': True,
'network_id': '************************************', 'tenant_id':
'********************************', 'binding:vif_details': {'port_filter': True,
'datapath_type': 'system', 'ovs_hybrid_plug': True}, 'binding:vnic_type':
'normal', 'binding:vif_type': 'ovs', 'mac_address': 'fa:16:3e:28:7f:7c',
'project_id': '********************************', 'created_at':

That is all I get, and there is unfortunately no FIP in the event. I do see the
fixed IP, though.

Regarding the behaviour of the router, I need to be more precise:

Apart from serving FIPs for VMs, the router itself has an IP in the external
network to serve as a NAT router. You'll see it under Project -> Network ->
Routers -> router -> Overview -> External Fixed IPs. OK, this is not a floating
IP, agreed. Still, this is also something we would like to keep track of.

Now, when there is no floating IP on the router for any VM, it still has this
IP. I do receive a deletion event of the IP when deleting the router. For
completeness, it looks like this:

DEBUG Received event: type router.delete.start, payload {'router_id':

 DEBUG Received event: type router.delete.end, payload {'router_id':
'************************************', 'router': {'status': 'ACTIVE',
'external_gateway_info': {'network_id': '************************************',
'enable_snat': True, 'external_fixed_ip...


Revision history for this message
Brian Haley (brian-haley) wrote :

Bjorn - thanks for the information. Can you just confirm the version of Neutron you're running as the second issue you mention ("Clear Gateway" in the Horizon dashboard) wasn't reproducible for me.

Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Björn Hagemeier (b-hagemeier) wrote :

Hi Brian,

we are using the Queens release deployed using Kolla Ansible using install_type binary on a CentOS base image.

Best regards,

Changed in neutron:
assignee: nobody → Brian Haley (brian-haley)
Revision history for this message
Dmitry Kubatkin (maelnor) wrote :

Hi Brian,
we have same problem on Stein release (latest git snapshot), and this affect our attempt on deep designate integration. Is there any progress on this bug?

Thanks in advance,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.