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

Fix Alpine and Mariner /etc/hosts templates #4780

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

dermotbradley
Copy link
Contributor

@dermotbradley dermotbradley commented Jan 16, 2024

Proposed Commit Message

Fix Alpine and Mariner /etc/hosts templates

Revert the changes I introduced with #1084, these had the side-effect
of causing "hostname" problems. Fixes #4771.

Also remove the "::1 {{fqdn}} {{hostname}}" entry as this being present
results in strange behaviour with "hostname -i" command: Busybox
returns "127.0.0.1", or "127.0.0.1 A.B.C.D" if an additional
non-loopback IP entry in /etc/hosts), Coreutils and net-tools both
return "::1" in both situations, whereas if the "::1" entry is removed
then Busybox, Coreutils, and net-tools "hostname -i" all behave in the
same fashion returning "127.0.0.1" or "127.0.0.1 A.B.C.D" as appropriate.

Also correct hosts.mariner.tmpli file it was not valid (every line
was prefixed with "+").

Fixes GH-4771

Additional Context

Test Steps

Checklist

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

Revert the changes I introduced with canonical#1084, these had the side-effect
of causing "hostname" problems. Fixes canonical#4771.

Also remove the "::1 {{fqdn}} {{hostname}}" entry as this this being
results in strange behaviour with both Busybox "hostname -i" (returns
"127.0.0.1", or "127.0.0.1 A.B.C.D" if an additional non-loopback IP
entry in /etc/hosts) and Coreutils "hostname -i" (returns "::1" in
both situations), commands whereas if the "::1" entry is removed then
both Busybox and Coreutils behave the the same fashion returning
"127.0.0.1" or "127.0.0.1 A.B.C.D" as appropriate.

Also correct hosts.mariner.tmpli file it was not valid (every line
was prefixed with "+").
Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holmanb holmanb merged commit 7241883 into canonical:main Jan 25, 2024
29 checks passed
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