Ask Your Question
0

Facter & IPv6 & fqdn issues

asked 2014-09-28 22:20:13 -0500

dlevene gravatar image

Hi All,

Please note this is a direct copy from the forum post here - https://groups.google.com/forum/#!top...

I'm having issues with facter-2.2.0-1.el6.x86_64 and hostname resolution. Previously we were on facter-1.6.18-1.el6 and we are looking to update all of our hosts to 2.2.0x+

We have a mix of hosts in our environment with IPv4& IPv6 addresses. The hosts which have an IPv4 address don't have any issues, the hosts which are IPv6 only do!

# rpm -q facter; facter hostname fqdn ipaddress
facter-1.6.18-1.el6.x86_64
fqdn => host.location.example.com
hostname => host
ipaddress => aaaa:bbbb:ccc:d:eeee:ff:gggg:hhhh

What I do notice is that /usr/lib/ruby/site_ruby/1.8/facter/domain.rb is using hostname to resolve name.

When we update to facter 2.2 the fqdn changes due to domain.rb using hostname -f

# rpm -q facter; facter hostname fqdn ipaddress
facter-2.2.0-1.el6.x86_64
fqdn => host.example.com (location is now missing)
hostname => host
ipaddress => aaaa:bbbb:ccc:d:eeee:ff:gggg:hhhh

# hostname -f
hostname: No address associated with name

Should we be using hostname -A and using the first result if hostname -f fails?

This issue is not present in net-tools 2.x which is part of the Linux 7.x range.

Note: if we add in a work around of "127.0.0.2 host.location.example.com host" into /etc/hosts it works as expected, but then facter ipaddress returns the private address and this is unwanted behavior.

Any feedback is welcomed on this as i'm keen to move forward and get facter 2.2.0x installed.

Thanks David

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-07 11:34:28 -0500

Looks like you are running into Bug #12556.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-28 22:20:13 -0500

Seen: 300 times

Last updated: Oct 07 '14