resolv.conf search path doesn't match the domain for the host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
LaMont Jones | ||
1.9 |
Fix Released
|
High
|
LaMont Jones | ||
2.0 |
Fix Released
|
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_
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
- Mike Pontillo (community): Approve
-
Diff: 67 lines (+22/-4)2 files modifiedsrc/maasserver/preseed_network.py (+5/-1)
src/maasserver/tests/test_preseed_network.py (+17/-3)
- Mike Pontillo (community): Approve
-
Diff: 66 lines (+20/-3)3 files modifieddocs/changelog.rst (+2/-0)
src/maasserver/preseed_network.py (+6/-1)
src/maasserver/tests/test_preseed_network.py (+12/-2)
- LaMont Jones (community): Approve
-
Diff: 64 lines (+18/-3)3 files modifieddocs/changelog.rst (+2/-0)
src/maasserver/preseed_network.py (+5/-1)
src/maasserver/tests/test_preseed_network.py (+11/-2)
Changed in maas: | |
assignee: | nobody → LaMont Jones (lamont) |
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 |
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}"