Configuring the DNS zone on a cluster with '.' as the last character, breaks DNS

Bug #1433623 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
New
Critical
Unassigned

Bug Description

THe Cluster Controller was configured with a DNS Zone as follows that contained a '.' at the end of the zone name:

'cluster.one.' instead of 'cluster.one'

when using the '.' at the end of the zone, we would see the following issue:

2015-03-18 13:53:03 [maas.dns] ERROR: Reloading BIND zone u'cluster.mallards.' failed: Command `rndc -c /etc/bind/maas/rndc.conf.maas reload cluster.mallards.` returned non-zero exit status 1:
rndc: 'reload' failed: empty label
2015-03-18 13:53:03 [HTTPChannel,26,127.0.0.1] 500 Error - /MAAS/api/1.0/nodes/node-761b65be-cd69-11e4-ae5d-001b21006d7f/
 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
     response = self.get_response(request)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/views.py", line 124, in get_response
     response = get_response(request)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/views.py", line 105, in get_response
     return django_get_response(request)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 194, in get_response
     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
 --- <exception caught here> ---
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 118, in get_response
     response = middleware_method(request, e)
   File "/usr/lib/python2.7/dist-packages/maasserver/middleware.py", line 240, in process_exception
     self.RETRY_AFTER_SERVICE_UNAVAILABLE)
 exceptions.AttributeError: 'APIErrorsMiddleware' object has no attribute 'RETRY_AFTER_SERVICE_UNAVAILABLE'

After removing the '.', things worked again.

MAAS should allow the inclusion of the last '.' and deal with it gracefully, as this is how domains are referred to.

Changed in maas:
importance: Undecided → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.