Skip to content

myhostname: should recommend installing it before dns/resolve? #1280

@fsateler

Description

@fsateler

Having myhostname after dns/resolve in nsswitch.conf presents the following problems:

  1. If /etc/hosts is empty/nonexistent, querying for localhost will ask dns first, which does not seem reasonable.
  2. Querying for *.localhost will always ask dns first.
  3. Querying the local configured hostname or any subdomain will query dns first.
  4. Plenty of programs want to know the fqdn, so if the connection is flaky/slow but not dead you get (possibly very long) delays in resolving it.

The manpage suggests problem 3 is by design, but then if I'm using a local dns to resolve local hostnames, why do I want myhostname for?

I think myhostname should be recommended to be configured before dns, and note problem 3 in the manpage so that people can move it last if they need to. I can prepare a PR if you think the change should be made.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions