Bug #8639
open
IPv6 address don't report correctly from puppet reports
Added by David LeVene about 10 years ago.
Updated over 8 years ago.
Description
We currently use foreman in a reporting only setup and send facts from the puppet masters.
Some hosts which are IPv6 only in our network don't display the ip address correctly - see screen shot.
Files
- Category changed from Web Interface to Importers
Did a little bit of investigation into why this is happening, and the hosts table in the foreman database doesn't contain the correct information, so when its creating the host from a report/facts its truncating the IP address at the : (educated guess)
hosts.ip = 2400
fact_values.value WHERE fact_name_id =2 (ipaddress in this databases case) gives the correct IP address.
I can see some IP processing happening in assets/javascripts/host_edit.js, which is IPv4 releated so that would probably destroy the IP - but not sure if these functions are used/called.
Anyway, the facts coming in are correct, but the data mirrored in the hosts table is not which i believe is being done by something in the services/fact_importer.rb file?
Does facter ipaddress
show the IPv6 address then on v6-only hosts?
Foreman is just incapable of v6 support right now (partly because the tables are only meant to store v4 addresses, validation of addresses and lack of smart proxy support).
It probably needs adding to the NIC model first (once #7456 is merged) as an additional attribute - so you have v4 and/or v6 addresses stored per interface, then we can update the fact importer as you suggest to import the v6 address.
Facter does only report the IPv6 address.
IPv6 Only host
- facter | grep ip
ipaddress => 24xx:7Dxx:xxxxxx
ipaddress6 => 24xx:7dxx:xxxxx
ipaddress6_eth0 => 24xx:7dxx:xxxxx
ipaddress_lo => 127.0.0.1
as opposed to a server which has both ipv4 & 6
- facter | grep ip
ipaddress => xxx.xx.xx.xx
ipaddress6 => 24xx:7dxx:xxxx
ipaddress6_eth0 => 24xx:7dxx:xxxxx
ipaddress_eth0 => xxx.xx.xx.xx
ipaddress_lo => 127.0.0.1
- Related to Feature #14664: Add IPv6 Subnet to Host, Hostgroup and Nic Models added
Also available in: Atom
PDF