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

FACT-3459: Workaround 2693 by ignoring resolv.conf entries starting with dot #2762

Closed
wants to merge 1 commit into from

Conversation

AriaXLi
Copy link
Contributor

@AriaXLi AriaXLi commented Sep 30, 2024

Currently, systems without a FQDN can be mishandled by facter for certain /etc/resolv.conf content. This was initially noticed when systemd-resolved was installed on a host without domain.

systemd-resolved stub resolver sets 'search .' as a search domain, which results in the following hostname/domain/fqdn triplet: foo, ., foo... See: https://github.com/systemd/systemd/blob/v255/src/resolve/resolv.conf#L19

This is wrong on multiple levels: first, facter does not seem to handle '.' (the root level) well, and there have been PRs to remove the trailing dot in FQDN as far back as 2012 (PR 200), leaving user with a convenient, but sometimes ambiguous string that is not fully qualified.

This commit implements a a middle ground solution to support top-level/domainless servers without making a breaking change. Additionally, it adds more coverage for various search cases.

(cherry picked from commit 3bffeff)

…with dot

Currently, systems without a FQDN can be mishandled by facter for certain `/etc/resolv.conf` content.
This was initially noticed when systemd-resolved was installed on a host without domain.

systemd-resolved stub resolver sets 'search .' as a search domain, which results in the
following hostname/domain/fqdn triplet: foo, ., foo...
See: https://github.com/systemd/systemd/blob/v255/src/resolve/resolv.conf#L19

This is wrong on multiple levels: first, facter does not seem to handle '.' (the root level)
well, and there have been PRs to remove the trailing dot in FQDN as far back as 2012 (PR 200),
leaving user with a convenient, but sometimes ambiguous string that is not fully qualified.

This commit implements a a middle ground solution to support top-level/domainless servers
without making a breaking change. Additionally, it adds more coverage for various search
cases.

(cherry picked from commit 3bffeff)
@AriaXLi AriaXLi requested a review from a team as a code owner September 30, 2024 21:59
@AriaXLi AriaXLi closed this Sep 30, 2024
@AriaXLi
Copy link
Contributor Author

AriaXLi commented Sep 30, 2024

I was able to push directly to Geod24's PR instead of opening a new one so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants