Bonded interface details missing from puppet fact uploads

When using the fact uploader script, it appears that bonded interfaces show up but without any information about which interfaces make up the bonded device. I am assuming because these are not by default part of facter’s canned facts?

I have tried manually adding the following fact names/values to a host’s fact file and re-running the script, but no luck either getting the bonded interface to show what devices are attached to it, or if a nic is part of a bond, which bond.

attached_to_eth1: bond0
attached_to_eth2: bond0
attached_devices_bond0: eth1,eth2

Are there other fact names that foreman might be looking for?

I am using foreman 1.19 and the hosts involved are all RHEL7.



This is a limitation in facter. There is some logic to guess, but obviously this isn’t great.

Ideally we’d get this information from facter. Perhaps opening a ticket at would be a good start. Indicating the type (vlan/bond/bridge) in the networking facts would also be a great way to avoid guessing.

1 Like

I’ll be at Puppet HQ for the Puppetize Live hackathon tomorrow and will be sure to bring it up. But that said, I can create custom facts, I am just wondering what the fact names need to be? I tried a couple already as I mentioned in my original post. I don’t imagine they should be part of the networking structured fact? That would require an update to facter, but from glancing at app/services/puppet_fact_parser.rb, it looks like foreman might just be considering the legacy facts like ipaddress_XXX mtu_XXX, etc.



That is correct. The problem with custom facts is that in Foreman core we essentially will standardize. If Facter itself starts to produce different facts, it may be incompatible which can be hell to support.

If we can come up with a spec of how it’ll be produced, implement that with custom facts and get facter to copy it (or at least not introduce it in an incompatible way) then I think we can modify the fact importer.

On a related note: our fact importer does need an update to support the modern facts. In I’ve started with some preparations. I’d love to be ready for Facter 4 before it’s released and patches are very welcome.

cc @lzap we recently talked about this and how incredibly useful it would be.

Yeah, creating such a fact should be pretty straightforward as Linux exposes NIC parents/peers in the /sys/net structure. The only concern is that if that’s a custom fact, we don’t need to care about non-Linux system much, at least at the initial stage. If you want to push this into puppet, you need to think about non-Linux systems from the day one.

Not outputting the fact on non-Linux is probably an option.

1 Like

Did you manage to discuss this?

No unfortunately I got caught up with other topics, sorry! I am however currently asking about it on the Puppet community slack which most of the same people, including most Puppet employees participate on.