diff options
author | Michael Johnson <johnsomor@gmail.com> | 2022-06-03 18:33:58 +0000 |
---|---|---|
committer | Michael Johnson <johnsomor@gmail.com> | 2022-06-03 18:38:57 +0000 |
commit | 5237ce97da7b4c71723155c2276afdfe6af7dc9e (patch) | |
tree | d9e8cc822e47f070f38508f1fd86468e20fc0cc3 | |
parent | ab2bf7748863c6e76fa4a87629daecd516787a6d (diff) | |
download | designate-5237ce97da7b4c71723155c2276afdfe6af7dc9e.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
-rw-r--r-- | designate/central/service.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/designate/central/service.py b/designate/central/service.py index fbe880c2..df6ec7ea 100644 --- a/designate/central/service.py +++ b/designate/central/service.py @@ -2335,8 +2335,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 |