The Puppet Labs Issue Tracker has Moved:

Refactor #5871

The `domainname` fact could be much more robust...

Added by Anonymous about 4 years ago. Updated about 4 years ago.

Status:Needs DecisionStart date:01/12/2011
Priority:NormalDue date:
Assignee:Paul Nasrat% Done:


Target version:-
Keywords: Affected Facter version:

We've Moved!

Ticket tracking is now hosted in JIRA:


At the moment the domainname fact tries two methods to obtain the domain name of the current system:

  1. execute dnsdomainname
  2. parse /etc/resolv.conf

There are a number of additional tests that can be carried out to improve this, including trying hostname --fqdn, performing round-trip name resolution through the NSS libraries (to support LDAP hosts, NIS maps, or MDNS), and probably other mechanisms.

While none of these are assured, and some of them will sometimes return incorrect values as a consequence of local misconfiguration (often by the distribution installer), trying harder when we completely fail (eg: dnsdomainname not installed) is probably justified.

It is notable that this specific failure has caused real-world client systems to fail in confusing and painful ways.


#1 Updated by James Turnbull about 4 years ago

  • Category set to library
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Paul Nasrat

Also available in: Atom PDF