systemd should package libnss-myhostname

Bug #2052722 reported by Andrew Lutomirski
6
This bug affects 1 person
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://bugs.launchpad.net/ubuntu/+source/libnss-myhostname/+bug/1162478/comments/6

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.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

libnss-myhostname is packaged in Ubuntu. It's just not installed by default.

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.