The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
The `domainname` fact could be much more robust...
|Status:||Needs Decision||Start date:||01/12/2011|
|Assignee:||Paul Nasrat||% Done:|
|Keywords:||Affected Facter version:|
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:
At the moment the domainname fact tries two methods to obtain the domain name of the current system:
- execute dnsdomainname
- 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.