Just some additional details I found when looking at the debug output 
versus the code blocks.

I don't yet know how the code for facter in networking_resolver.cc 
(networking_resolver::read_routing_table() and 
networking_resolver::populate_from_routing_table) need to be modified. What 
I do see is that the call networking_resolver::associate_src_with_iface 
seems to be the likely culprit. 

It doesn't seem to be checking for differences in the routing for IPv6 or 
IPv4.  This is seen in the output for HOST A. The HOST B shows it correctly 
as that host has IPv6 enabled.

While the code could get way past my rudimentary C/C++ (it has been 20+ 
years since I wrote in C), how hard would it be to do a check against 
sysctl to see if IPv6 is even enabled?  Running *sysctl -a | grep ipv6* on 
all of the hosts, which are having an issue showing IPv4 addresses as IPv6, 
gives back no values as in these cases IPv6 is disabled in the kernel. 

As I don't have any IPv6 only machines I can't test the converse. This 
seems like it could be easy enough to call the sysctl check before doing 
the call in networking_resolver::read_routing_table() before 
lth_exe::each_line(ip_command, {"-6","route","show"}...  and then doing an 
if to test for return of 0 bytes or something similar. 

I don't know what this will do further down the line if there is no IPv6 
data for an interface. I/e null where the code wants data. 

Does this sound like I'm even on the right track?  
HOST A

2017-10-09 15:29:05.473574 DEBUG leatherman.execution:92 - executing 
command: /sbin/ip route show
2017-10-09 15:29:05.474408 DEBUG | - default via 10.118.108.1 dev eth0
2017-10-09 15:29:05.474553 DEBUG | - 10.118.108.0/24 dev eth0  proto 
kernel  scope link  src 10.118.108.38
2017-10-09 15:29:05.474622 DEBUG | - 127.0.0.0/8 dev lo  scope link
2017-10-09 15:29:05.474681 DEBUG | - 169.254.0.0/16 dev eth0  scope link
2017-10-09 15:29:05.474817 DEBUG leatherman.execution:556 - process exited 
with status code 0.
2017-10-09 15:29:05.474876 DEBUG leatherman.execution:92 - executing 
command: /sbin/ip -6 route show
2017-10-09 15:29:05.475665 DEBUG | - default via 10.118.108.1 dev eth0
2017-10-09 15:29:05.475787 DEBUG | - 10.118.108.0/24 dev eth0  proto 
kernel  scope link  src 10.118.108.38
2017-10-09 15:29:05.475855 DEBUG | - 127.0.0.0/8 dev lo  scope link
2017-10-09 15:29:05.475913 DEBUG | - 169.254.0.0/16 dev eth0  scope link
2017-10-09 15:29:05.476047 DEBUG leatherman.execution:556 - process exited 
with status code 0.


HOST B
2017-10-09 15:36:32.331306 DEBUG leatherman.execution:92 - executing 
command: /sbin/ip route show
2017-10-09 15:36:32.332170 DEBUG | - default via 10.118.108.1 dev 
eno16777984 proto static metric 100
2017-10-09 15:36:32.332269 DEBUG | - 10.118.108.0/24 dev eno16777984 proto 
kernel scope link src 10.118.108.26 metric 100
2017-10-09 15:36:32.332352 DEBUG leatherman.execution:556 - process exited 
with status code 0.
2017-10-09 15:36:32.332411 DEBUG leatherman.execution:92 - executing 
command: /sbin/ip -6 route show
2017-10-09 15:36:32.333430 DEBUG | - unreachable ::/96 dev lo metric 1024 
error -113
2017-10-09 15:36:32.333511 DEBUG | - unreachable ::ffff:0.0.0.0/96 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.333588 DEBUG | - unreachable 2002:a00::/24 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.333657 DEBUG | - unreachable 2002:7f00::/24 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.333727 DEBUG | - unreachable 2002:a9fe::/32 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.333800 DEBUG | - unreachable 2002:ac10::/28 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.333868 DEBUG | - unreachable 2002:c0a8::/32 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.333935 DEBUG | - unreachable 2002:e000::/19 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.334000 DEBUG | - unreachable 3ffe:ffff::/32 dev lo 
metric 1024 error -113
2017-10-09 15:36:32.334069 DEBUG | - fe80::/64 dev eno16777984 proto kernel 
metric 256
2017-10-09 15:36:32.334208 DEBUG leatherman.execution:556 - process exited 
with status code 0.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/4de61cc5-d652-46d0-9c95-2f31271e7160%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to