Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fqdn does not accept terminal dot #3962

Closed
ubuntu-server-builder opened this issue May 12, 2023 · 3 comments
Closed

fqdn does not accept terminal dot #3962

ubuntu-server-builder opened this issue May 12, 2023 · 3 comments
Labels
good first issue launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1966533

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2022-12-12T13:58:54.102048+00:00
date_created = 2022-03-26T01:17:58.811130+00:00
date_fix_committed = 2022-04-26T13:33:43.950254+00:00
date_fix_released = 2022-12-12T13:58:54.102048+00:00
id = 1966533
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1966533
milestone = None
owner = evancarroll
owner_name = Evan Carroll
private = False
status = fix_released
submitter = evancarroll
submitter_name = Evan Carroll
tags = ['bitesize']
duplicates = []

Launchpad user Evan Carroll(evancarroll) wrote on 2022-03-26T01:17:58.811130+00:00

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.bar.com.foobar.com.

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-2-65-89.openstack.build.
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.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Evan Carroll(evancarroll) wrote on 2022-03-26T01:18:21.717561+00:00

This is inspired on my question and self-research here,

https://devops.stackexchange.com/q/15678/18965

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2022-03-28T15:29:29.780441+00:00

Thanks for this bug report. Since hostname setting is implementation dependent, we should include a note in the docs that some tools don't accept the trailing dot.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2022-04-26T13:33:38.597823+00:00

Doc was updated in #1365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant