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

Populate /etc/hosts with an entry for settings.network.hostname #1700

Closed
zmrow opened this issue Aug 6, 2021 · 1 comment · Fixed by #1713
Closed

Populate /etc/hosts with an entry for settings.network.hostname #1700

zmrow opened this issue Aug 6, 2021 · 1 comment · Fixed by #1713
Assignees
Labels
area/core Issues core to the OS (variant independent)
Milestone

Comments

@zmrow
Copy link
Contributor

zmrow commented Aug 6, 2021

Currently we populate/etc/hosts with entries for 127.0.0.1 and ::1 that alias to localhost.

We need to populate it with an entry to alias 127.0.0.1 to the hostname.

One example: For other distros (Ubuntu) CAPI populates this entry in /etc/hosts and kube-vip appears to use /etc/hosts to resolve the hostname.

@zmrow
Copy link
Contributor Author

zmrow commented Aug 6, 2021

We'll definitely need to double check that this doesn't break anything on EC2, but it doesn't seem like it would.

Here's an example of the CAPI code that runs during provisioning:

runcmd:
...
  - "echo \"::1         ipv6-localhost ipv6-loopback\" >/etc/hosts"
  - "echo \"127.0.0.1   localhost\" >>/etc/hosts"
  - "echo \"127.0.0.1   {{ ds.meta_data.hostname }}\" >>/etc/hosts"
...

@zmrow zmrow added area/core Issues core to the OS (variant independent) status/notstarted labels Aug 6, 2021
@zmrow zmrow self-assigned this Aug 10, 2021
@zmrow zmrow added status/in-progress This issue is currently being worked on and removed status/notstarted labels Aug 17, 2021
@zmrow zmrow added this to the next milestone Aug 20, 2021
@bcressey bcressey removed the status/in-progress This issue is currently being worked on label Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants