facterdb icon indicating copy to clipboard operation
facterdb copied to clipboard

Ensure all facts have networking.ip6 fact

Open bastelfreak opened this issue 3 years ago • 5 comments

Currently not all factsets have networking.ip6. I'm wondering if we should enforce this.

bastelfreak avatar Jul 19 '22 20:07 bastelfreak

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.

ekohl avatar Jul 20 '22 08:07 ekohl

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.

bastelfreak avatar Jul 20 '22 08:07 bastelfreak

AFAIK link local never shows up as networking.ip6. I at least hope not because it's usually useless and unusable.

ekohl avatar Jul 20 '22 08:07 ekohl

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?

smortex avatar Aug 02 '22 19:08 smortex

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.

ekohl avatar Aug 03 '22 10:08 ekohl