systemd should package libnss-myhostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Ubuntu generally decided not to use libnss-myhostname in 2014, due to:
https:/
which says "I don't agree that libnss-myhostname is a technically sound approach, *period*; it works at cross-purposes to the existing Debian handling of the hostname being resolved to 127.0.1.1 via /etc/hosts. There should be a plan for aligning these, across *all* systems, not just desktop systems."
While this may well have made sense in 2014, I think it's no longer the right decision in light of widespread adoption of containers. Container managers (Docker, Podman, systemd-nspawm, etc) generally set the container's hostname from _outside_ the container, either by bind-mounting over /etc/hostname or by simply not having /etc/hostname. In either case, the hostname of the container cannot be reliably predicted based on the contents of the container image, and editing /etc/hosts inside the container to make the hostname resolvable is fragile at best.
While other solutions exist (arranging for the container manager to make sure that the container's hostname is resolvable from inside the container), libnss-myhostname offers users a straightforward way to allow the container's hostname to be resolved.
Please reconsider packaging it. Debian packages libnss-myhostname.
libnss-myhostname is packaged in Ubuntu. It's just not installed by default.