The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Refactor #5871

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

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

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

0%

Category:library
Target version:-
Keywords: Affected Facter version:
Branch:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the FACT project on JIRA using the button below:


Description

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.

History

#1 Updated by James Turnbull almost 4 years ago

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

Also available in: Atom PDF