ip6address not detected correctly on FreeBSD
Running Chef on FreeBSD and the node['ip6address'] is always ::1
Hey - so we're gonna merge your other PR, but for this one, I think there's a different fix - the ip address sorting in the OS-agnostic network.rb SHOULD be picking the right thing for ip6address (in fact, that's what chooses it).
We're gonna dig into this a bit more. @ramereth is gonna get us some output, but @feld can you get us the output of ifconfig -a on your system so we can try to repro this?
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=4c079b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
ether fa:16:3e:ad:ed:0b
inet 140.211.10.102 netmask 0xffffffc0 broadcast 140.211.10.127
inet6 fe80::f816:3eff:fead:ed0b%vtnet0 prefixlen 64 scopeid 0x1
inet6 2605:bc80:3010:506:f816:3eff:fead:ed0b prefixlen 64 autoconf pltime 604800 vltime 2592000
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=4c079b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
ether fa:16:3e:ad:ed:0b
inet 140.211.10.102 netmask 0xffffffc0 broadcast 140.211.10.127
inet6 fe80::f816:3eff:fead:ed0b%vtnet0 prefixlen 64 scopeid 0x1
inet6 2605:bc80:3010:506:f816:3eff:fead:ed0b prefixlen 64 autoconf pltime 604800 vltime 2592000
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lo1: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 fe80::1%lo1 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 64
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
the ip address sorting in the OS-agnostic network.rb SHOULD be picking the right thing for ip6address (in fact, that's what chooses it).
I don't know what to tell you. If I ship the Ohai plugin as modified in my PR it works correctly. Please just fix this. Simple things like this shouldn't sit rotting for years. You have FreeBSD machines because you build and ship FreeBSD Omnibus, etc where you can verify this.
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=4c079b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
ether fa:16:3e:ce:14:ac
inet 57.129.113.80 netmask 0xffffffff broadcast 57.129.113.80
inet6 2001:41d0:701:1100::8ab1 prefixlen 64
inet6 fe80::f816:3eff:fece:14ac%vtnet0 prefixlen 64 scopeid 0x1
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pflog0: flags=1000141<UP,RUNNING,PROMISC,LOWER_UP> metric 0 mtu 33152
options=0
groups: pflog