fqdn does not accept terminal dot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned |
Bug Description
A fully qualified domain is not
foo.bar.com
But instead,
foo.bar.com.
Otherwise the fqdn hit up the resolver and searches on the network for a matching host. So if the resolver is on network
foobar.com.
And you query for `foo.bar.com` it'll look up a host by that name
foo.
To stop this you fully-qualify with a terminal dot. This creates a problem because hostname does not accept a terminal dot,
sudo hostname host-10-
hostname: the specified hostname is invalid
And cloud-init blindly submits the input to hostname. Which is weird, because you have to supply an fqdn which actually can _not_ currently be a fqdn. The desired fix for this would be to trim off the dot from the value supplied in fqdn, before providing it to hostname.
description: | updated |
Changed in cloud-init: | |
status: | Fix Committed → Fix Released |
This is inspired on my question and self-research here,
https:/ /devops. stackexchange. com/q/15678/ 18965