in-addr.arpa is not considered a valid TLD by default

Bug #1889073 reported by Vladyslav Drok on 2020-07-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Wishlist
Vladyslav Drok

Bug Description

We hit the issue sometimes when running tempest tests concurrently. It appears that one of the tests creates a TLD and then another test tries to create a zone that is not present in the list TLDs created by another test. Failing tests are neutron_tempest_plugin.scenario.test_dns_integration.DNSIntegrationTests.test_fip and neutron_tempest_plugin.scenario.test_dns_integration.DNSIntegrationTests.test_server_with_fip

Here are some relevant bits of logs:

2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource [req-d4785867-a3e3-4d7c-b490-26c843b156d5 e94a3905a1b34a14b483e7c5027dcf7a 44079f7d43594dd182823303f4a13649 - default default] create failed: No details.: designateclient.exception
s.BadRequest: Invalid TLD
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource Traceback (most recent call last):
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/services/externaldns/drivers/designate/driver.py", line 119, in create_record_set
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource [recordset_name])
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/v2/recordsets.py", line 46, in create
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource name, zone_info = self._canonicalize_record_name(zone, name)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/v2/recordsets.py", line 30, in _canonicalize_record_name
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource zone_info = self.client.zones.get(zone)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/v2/zones.py", line 54, in get
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource zone = v2_utils.resolve_by_name(self.list, zone)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/v2/utils.py", line 40, in resolve_by_name
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise exceptions.NotFound("Name %s didn't resolve" % name)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource designateclient.exceptions.NotFound: Name 12.11.10.in-addr.arpa. didn't resolve
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource During handling of the above exception, another exception occurred:
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource Traceback (most recent call last):
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/api/v2/resource.py", line 98, in resource
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource result = method(request=request, **args)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/api/v2/base.py", line 437, in create
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return self._create(request, body, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 139, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 135, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_db/api.py", line 154, in wrapper
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_db/api.py", line 142, in wrapper
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 183, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource LOG.debug("Retry wrapper got retriable exception: %s", e)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 179, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/api/v2/base.py", line 556, in _create
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource obj = do_create(body)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/api/v2/base.py", line 538, in do_create
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource request.context, reservation.reservation_id)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/api/v2/base.py", line 531, in do_create
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return obj_creator(request.context, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/services/l3_router/l3_router_plugin.py", line 185, in create_floatingip
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource initial_status=n_const.FLOATINGIP_STATUS_DOWN)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 233, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return method(*args, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 139, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 135, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_db/api.py", line 154, in wrapper
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_db/api.py", line 142, in wrapper
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 183, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource LOG.debug("Retry wrapper got retriable exception: %s", e)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource self.force_reraise()
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise value
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron_lib/db/api.py", line 179, in wrapped
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/db/l3_dvr_db.py", line 1138, in create_floatingip
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource context, floatingip, initial_status)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/db/l3_db.py", line 1366, in _create_floatingip
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource dns_data)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/db/dns_db.py", line 117, in _process_dns_floatingip_create_postcommit
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource [floatingip_data['floating_ip_address']])
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/db/dns_db.py", line 247, in _add_ips_to_external_dns_service
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource ips)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/neutron/services/externaldns/drivers/designate/driver.py", line 123, in create_record_set
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource description=in_addr_zone_description)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/v2/zones.py", line 46, in create
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return self._post('/zones', data=data)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/client.py", line 58, in _post
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource resp, body = self.client.session.post(url, **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 392, in post
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource return self.request(url, 'POST', **kwargs)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource File "/var/lib/openstack/lib/python3.6/site-packages/designateclient/v2/client.py", line 91, in request
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise exceptions.BadRequest(**response_payload)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource raise exceptions.BadRequest(**response_payload)
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource designateclient.exceptions.BadRequest: Invalid TLD
2020-06-22 04:45:37.660 14 ERROR neutron.api.v2.resource

According to code https://github.com/openstack/designate/blob/0f7c6adc0b1ca3a716248ec767bdf809622e7d82/designate/central/service.py#L276 TLDs are checked only if there is at least a single one, and there are no defaults, like for example in-addr.arpa. It might make sense to add a possibility to configure some defaults without having to create them explicitly.

Vladyslav Drok (vdrok) on 2020-07-27
Changed in designate:
assignee: nobody → Vladyslav Drok (vdrok)

Fix proposed to branch: master
Review: https://review.opendev.org/743222

Changed in designate:
status: New → In Progress
Dr. Jens Harbott (j-harbott) wrote :

I'm not sure the tests are designed to be run in parallel, if yes, the tests should be fixed, not the behaviour of designate.

Changed in designate:
status: In Progress → Invalid
importance: Undecided → Wishlist
status: Invalid → Incomplete

Fix proposed to branch: master
Review: https://review.opendev.org/743946

Changed in designate:
status: Incomplete → In Progress

Change abandoned by Vladyslav Drok (<email address hidden>) on branch: master
Review: https://review.opendev.org/743222
Reason: makes sense to fix the tests instead, first attempt at https://review.opendev.org/743946

Vladyslav Drok (vdrok) wrote :

Hey Jens, here is the fix for tests, but not sure if these are all that affect the neutron tests.

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

Other bug subscribers