facterdb
facterdb copied to clipboard
Ensure all facts have networking.ip6 fact
Currently not all factsets have networking.ip6. I'm wondering if we should enforce this.
I'm wondering if we should enforce this.
I can see both advantages and disadvantages. On the one hand, not having an IPv6 address is completely possible and valid. On the other hand, you sometimes do want to test with it.
In cases where it matters I've always explicitly overridden it and not relied on the basic facts.
yes, that's why I'm unsure as well. I did say that usual linux boxes at least have a link local address so it would be nice to rely on that during testing as well. I run into this because some of our factsets have ipv6 addresses and some don't . also overwriting the networking hash is a bit ugly I think.
AFAIK link local never shows up as networking.ip6. I at least hope not because it's usually useless and unusable.
AFAIK link local never shows up as
networking.ip6. I at least hope not because it's usually useless and unusable.
That makes no sense but they do :shrug: :
romain@desktop-fln40kq ~/Projects/puppet-bacula % facter networking.ip6
fe80::aa5e:45ff:feb7:3a51
romain@desktop-fln40kq ~/Projects/puppet-bacula % facter --version
4.2.10
If it makes more sense, maybe we can expect an IPv6 reserved for documentation (i.e. in the 2001:DB8::/32 range, see RFC 3849) in the test suite and require the factsets to be adequately tuned (by hand) when submitting a new OS?
In Foreman we do filter out reported link local addresses. I recall at some point they even reported the interface in the link local address!
Also note that there's https://github.com/rodjek/rspec-puppet/pull/772. So at least there is some legacy fact set.
It should also be noted that in Linux when you remove the ipv6 kernel module you don't have a link local address at all, but I think we can consider that edge case unsupported.