From 9def99f3d20df5253bafba24bd1ca2ea9c99a032 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Mon, 28 Oct 2019 09:06:33 +0000 Subject: [PATCH] Remove Floating IP DNS record upon associated port deletion Port deletion triggers disassociate_floatingips. This patch ensures that method not only clears the port association for a Floating IP, but also removes any DNS record associated with it. Change-Id: Ia6202610c09811f240af35e2523126447bf02ca5 Closes-Bug: #1812168 (cherry picked from commit 4379310846078c45df140071688f740cd900c1d6) --- neutron/db/l3_db.py | 3 +++ .../releasenotes/notes/bug-1812168-838b20237ad04df8.yaml | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/releasenotes/notes/bug-1812168-838b20237ad04df8.yaml diff --git a/neutron/db/l3_db.py b/neutron/db/l3_db.py index 13fa5ee2a6a..39db7db9194 100644 --- a/neutron/db/l3_db.py +++ b/neutron/db/l3_db.py @@ -1663,6 +1663,9 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase, 'context': context, 'router_ids': router_ids, } + # Process DNS record removal after committing the transaction + if self._is_dns_integration_supported: + self._process_dns_floatingip_delete(context, fip.to_dict()) registry.notify(resources.FLOATING_IP, events.AFTER_UPDATE, self, **assoc_result) return router_ids diff --git a/releasenotes/notes/releasenotes/notes/bug-1812168-838b20237ad04df8.yaml b/releasenotes/notes/releasenotes/notes/bug-1812168-838b20237ad04df8.yaml new file mode 100644 index 00000000000..b075e965574 --- /dev/null +++ b/releasenotes/notes/releasenotes/notes/bug-1812168-838b20237ad04df8.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + [`bug 1812168 `_] + Remove Floating IP DNS record upon associated port deletion.