Report ExternalDNSOverQuota exception for recordset quota error

When floating IP or port with DNS records are created and the recordset
quota value of the external dns service (e.g. designate) exceeds limit,
the recordset creation fails. Report the exact reason of failure i.e.
ExternalDNSOverQuota instead of HttpException.

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/786174

Closes-Bug: #1923700
Change-Id: Ie1dd5c26ec0eb1875d2a6a176838598117678f4a
This commit is contained in:
kpdev 2021-04-14 09:38:45 +02:00
parent 309639ca89
commit c16f88d148
2 changed files with 8 additions and 0 deletions

View File

@ -102,6 +102,8 @@ class Designate(driver.ExternalDNSService):
raise dns_exc.DNSDomainNotFound(dns_domain=dns_domain)
except d_exc.Conflict:
raise dns_exc.DuplicateRecordSet(dns_name=dns_name)
except d_exc.OverQuota:
raise dns_exc.ExternalDNSOverQuota(resource="recordset")
if not CONF.designate.allow_reverse_dns_lookup:
return

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Report external dns service OverQuota exception as new neutron
ConflictException (409) i.e. ExternalDNSOverQuota. Report the failure
as "External DNS Quota exceeded for resources: recordset".