Issue #2533 has been updated by Daniel Pittman.

The definition of "correct" here is, like many of our network facts, pretty 
much impossible to get right except in simple cases.

There are plenty of times when a DNS lookup doesn't work, such as dynamic IP 
IPS users, who have a local domain but "incorrect" reverse DNS records.

What we should do is document the mechanism, and perhaps why we believe this to 
be "correct" for the system.
----------------------------------------
Feature #2533: Facter's domain.rb resolves DNS domain wrong
https://projects.puppetlabs.com/issues/2533

Author: Alf Wachsmann
Status: Closed
Priority: High
Assignee: Paul Nasrat
Category: 
Target version: 
Keywords: 
Branch: 


Hi,

my machine and DNS configuration is a little unusual for various reasons
and the latest version of facter's domain.rb guesses the DNS domain of the
nodes wrong.

[root@psdss101]# cat /etc/hosts
127.0.0.1               localhost.localdomain localhost
172.21.34.21            psdss101

So, no domain name here.

[root@psdss101]# dnsdomainname
[ returns an empty string ]
[root@psdss101]# domainname
(none)
[root@psdss101]# cat /etc/resolv.conf
search srv.pcdsn mgt.pcdsn dss.pcdsn cds.pcdsn
nameserver 172.21.32.20

[root@psdss101]# facter
domain => srv.pcdsn
facterversion => 1.5.5
fqdn => psdss101.srv.pcdsn
hostname => psdss101
[ shortened for readability ]

As you can see, facter simply uses the first domain it finds in
/etc/resolv.conf but that is not the correct domain for the host.
(If I were using NIS on my machines, it would report the NIS domain
as my DNS domain which would also be wrong.)

But DNS has it right:

[root@psdss101]# /usr/bin/host psdss101
psdss101.dss.pcdsn has address 172.21.34.21


Wouldn't it be better if facter would actually use DNS to find out the
DNS domain name instead of (badly) playing DNS itself?


This is on 64 bit RHEL5.2:
[root@psdss101]# cat /etc/redhat-release 
Red Hat Enterprise Linux Client release 5.2 (Tikanga)
[root@psdss101]# uname -a
Linux psdss101 2.6.18-128.1.14.el5_lustre.1.8.1 #1 SMP Mon Jul 20 07:30:22 MDT 
2009 x86_64 x86_64 x86_64 GNU/Linux


Thanks,
          Alf.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to