Make sure that `$(hostname)` is resolvable
Some distros, e.g. Fedora 34, are moving away from adding 127.0.1.1 $(hostname) $(hostname).local
or similar to /etc/hosts
in favor of having the hostname resolvable via systemd's nss-myhostname. Arch still mentions editing hosts
in their installation guide but many people skip that step and they are perfectly fine since the default nsswitch.conf
includes myhostname
.
As far as I can tell we end up with host's /etc/hosts
copied into the pressure vessel's container and nsswitch.conf
is configured to only use files and dns. This makes $(hostname)
unresolvable in the cases mentioned above.
This leads to Proton/wine spamming the logs with err:winediag:WS_getaddrinfo Failed to resolve your host name IP
which is confusing to debug and usually turns out to be a red herring. Only recently we have found games that actually do not like this.
Not sure if using nss-myhostname
from inside the container would even work, but I think we can at least make sure that /etc/hosts
contains a line for $(hostname)
.