Conflict between "DNS zone name" in Cluster controller and "Default domain for new nodes" in settings

Bug #1155607 reported by Ramon Acedo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Raphaël Badin

Bug Description

Running 1.2+bzr1360+dfsg-0ubuntu1~ppa1 on Precise

If MAAS manages DHCP and DNS, and under Cluster controller we leave the default DNS zone name to "master" and then in the settings panel, down under Network configuration we leave the default "local" for "Default domain for new nodes" we cannot use the constraint "maas-name=node.master" and an error is shown, example:

juju deploy --repository=. --config=openstack.yaml --constraints "maas-name=controller.master" local:precise/nova-cloud-controller

And then in /var/log/maas:
ERROR 2013-03-15 12:30:06,214 maas.maasserver ################################ Exception: No matching node is available. ################################
ERROR 2013-03-15 12:30:06,215 maas.maasserver Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 22, in inner_func
    response = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 166, in __call__
    result = self.error_handler(e, request, meth, em_format)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 164, in __call__
    result = meth(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 308, in dispatch
    return function(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 945, in acquire
    raise NodesNotAvailable("No matching node is available.")
NodesNotAvailable: No matching node is available.

Even though controller.master CNAME is added to the maas zone file in bind.

I checked in the django models and the reason is that we use the "local" and not the "master" domain:

$ sudo maas shell
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from maasserver.models import Node
>>> Node.objects.all()[0].hostname
u'controller.local'
>>>

If we specify the constraint maas-name with the "local" domain then it works.

I'm not sure if this is expected or if it would be better to give preference to the DNS name set by the maas-dns config with bind.

Thanks.

Related branches

summary: - "DNS zone name" in Cluster controller and "Default domain for new
- nodes" in settings should be the same
+ Conflict between "DNS zone name" in Cluster controller and "Default
+ domain for new nodes" in settings
Changed in maas:
status: New → Triaged
importance: Undecided → High
tags: added: trivial ui
Changed in maas:
milestone: none → 13.10
Revision history for this message
Raphaël Badin (rvb) wrote :

Actually, I don't think this is a simple ui problem. This is a side-effect of the mix-up between a node's hostname and a node's fqdn.

We could change what "maas-name" refers to (from node.hostname to node.fqdn) but that could break existing scripts and thus I would be a bit reluctant to do that. One backward-compatible solution would be to add a new tag named something like "maas-fqdn" and make that tag point to node.fqdn.

Revision history for this message
Gavin Panella (allenap) wrote :

I can't remember what the default domain is needed for. Do we need the .local stuff at all? Put another way, is there a reason why Node.hostname can't be an unqualified name?

Revision history for this message
Raphaël Badin (rvb) wrote :

I seem to remember the ".local" stuff was first introduced when we wanted to support using avahi to resolve hostnames. Now this does not explain why we decided to stuff the domain part in the hostname instead of putting it on nodegroup only. This whole area is a bit of a mess, we need to investigate some more and clean it up.

Btw, is the avahi feature still relevant? I suppose the answer is a resounding "yes" but I'm still asking because I haven't seen it used in practice, ever.

Raphaël Badin (rvb)
Changed in maas:
assignee: nobody → Raphaël Badin (rvb)
status: Triaged → In Progress
Raphaël Badin (rvb)
tags: removed: trivial ui
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.