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

hostname is not handled correctly in /etc/hosts during install #264

Open
rolkinn opened this issue Sep 15, 2021 · 1 comment
Open

hostname is not handled correctly in /etc/hosts during install #264

rolkinn opened this issue Sep 15, 2021 · 1 comment

Comments

@rolkinn
Copy link

rolkinn commented Sep 15, 2021

Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
hostname
/etc/hosts

Issue/Bug Description:
When choosing a hostname that is not "pop-os", /etc/hosts is not updated and continues to use the default "pop-os" hostname.

Output of mismatch after fresh install (or changing hostname via settings ui):
$ hostname

myhostname

$ cat /etc/hosts

127.0.0.1 localhost
::1 localhost
127.0.1.1 pop-os.localdomain pop-os

should be
$ cat /etc/hosts

127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname

Impact:
This causes delays when resolving hosts.
For example, sudo will hang for an extended period of time if there is a mismatch in hostname and /etc/hosts.

Steps to reproduce (if you know):

  1. Install Pop!_OS and choose any hostname that is not "pop-os". OR change hostname through System Settings.
  2. Connect to internet. Optional: connect to internet and a VPN.
  3. Run sudo. (this should hang for some amount of time before returning).

Expected behavior:
When hostname is updated, /etc/hosts should also be updated to reflect change (see above /etc/hosts output suggestion).

Other Notes:
The sudo command will sometimes not hang, however, it would always hang when also connected to a VPN.

@mmstick mmstick transferred this issue from pop-os/installer Sep 21, 2021
@jacobgkau
Copy link
Member

Possibly related to pop-os/systemd#5, if the hostname is set using hostnamectl or similar.

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

No branches or pull requests

2 participants