summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Johnson <johnsomor@gmail.com>2022-06-03 18:33:58 +0000
committerMichael Johnson <johnsomor@gmail.com>2022-06-03 23:08:25 +0000
commit790f096364cc7eb1171feee1e17f75d39f8c1d25 (patch)
tree08c94750e0274e1fdaf9b990231f4afadf686c42
parentf08ff2efaaebc1be6194d9d7b774bee5a3f926af (diff)
downloaddesignate-790f096364cc7eb1171feee1e17f75d39f8c1d25.tar.gz
Fix incorrect 404 error on floating IP create
There is a case when creating a floating IP could return a 404 error instead of the expected floating IP payload. This fix is extracted from a non-backportable fix that was applied on yoga a newer branches[1]. [1] https://review.opendev.org/c/openstack/designate/+/830549 Change-Id: I53c2a0faf93be19eca259100fe6c3961ef4e7938 (cherry picked from commit 5237ce97da7b4c71723155c2276afdfe6af7dc9e)
-rw-r--r--designate/central/service.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/designate/central/service.py b/designate/central/service.py
index 135bb341..e65429e3 100644
--- a/designate/central/service.py
+++ b/designate/central/service.py
@@ -2336,8 +2336,12 @@ class Service(service.RPCService):
# RS or Zone.
if record and record.action != 'DELETE':
if not recordset:
- recordset = self.storage.get_recordset(
- elevated_context, record.recordset_id)
+ try:
+ recordset = self.storage.get_recordset(
+ elevated_context, record.recordset_id)
+ except exceptions.RecordSetNotFound:
+ LOG.debug('No recordset found for %s', fip['id'])
+ return fip_ptr
fip_ptr['action'] = recordset.action
fip_ptr['status'] = recordset.status