resolv.conf search path doesn't match the domain for the host

Bug #1636251 reported by LaMont Jones on 2016-10-24
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
High
LaMont Jones
1.9
High
LaMont Jones
2.0
High
LaMont Jones

Bug Description

When a machine is deployed, we appear to always give it a search path based on the default domain, rather than the actual domain that the machine is in. As a result, the machine cannot resolve its own hostname (since it becomes $MACHINE_NAME.$DEFUALT_DOMAIN} instead of the actual node.fqdn.

To reproduce (given default domain of "maas"):
1. add a domain "bad"
2. Deploy a machine as "testhost.bad"
3. Login and note thus:
     hostname -f
     hostname: Name or service not known
4. Note also that /etc/resolv.conf has "search maas" instead of "search bad" or "search bad maas"

The short fix is probably to make it say "search bad", with a long-term solution of allowing the search list for the node to be specified by the admin (and always prepending node.domain.name, since that determines the FQDN for the host.)

Related branches

LaMont Jones (lamont) on 2016-10-24
Changed in maas:
assignee: nobody → LaMont Jones (lamont)
LaMont Jones (lamont) wrote :

What we actually do today is search = {sorted list of domains for which maas is authoritative}

Which is wrong in various ways, especially if the domain of the machine doesn't happen to sort first.

The correct solution is "search node.domain {any other domains, sorted for consistency}"

no longer affects: maas/2.1
no longer affects: maas/trunk
Changed in maas:
importance: Undecided → High
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers