Problem:
I am configuring the network connections of my client hosts with puppet using the enc information which I can check with the “Puppet YAML” button in the GUI, parameters - foreman_interfaces - attrs - bindings/bindings6
I have noticed that in some cases some information is missing for my hosts. One case is when the interface is set to virtual, then attrs is empty, i.e. “attrs: {}” although there are bindings in the facts.
For instance, facts for a client host contains this:
networking => {
domain => "os.example.com",
fqdn => "ostest.os.example.com",
hostname => "ostest",
interfaces => {
bond0 => {
bindings6 => [
{
address => "fe80::e63d:1aff:fedc:1e60",
netmask => "ffff:ffff:ffff:ffff::",
network => "fe80::"
}
],
ip6 => "fe80::e63d:1aff:fedc:1e60",
mac => "e4:3d:1a:dc:1e:60",
mtu => 9000,
netmask6 => "ffff:ffff:ffff:ffff::",
network6 => "fe80::",
scope6 => "link"
},
bond0.601 => {
bindings => [
{
address => "10.60.1.101",
netmask => "255.255.255.0",
network => "10.60.1.0"
}
],
bindings6 => [
{
address => "fe80::e63d:1aff:fedc:1e60",
netmask => "ffff:ffff:ffff:ffff::",
network => "fe80::"
}
],
ip => "10.60.1.101",
ip6 => "fe80::e63d:1aff:fedc:1e60",
mac => "e4:3d:1a:dc:1e:60",
mtu => 9000,
netmask => "255.255.255.0",
netmask6 => "ffff:ffff:ffff:ffff::",
network => "10.60.1.0",
network6 => "fe80::",
scope6 => "link"
},
...
Checking facts for the client host in foreman also shows the bindings listed for interface bond0.601. However, the generated puppet yaml for this host looks like this:
foreman_interfaces:
- ip:
ip6:
mac: e4:3d:1a:dc:1e:60
name: ''
attrs:
bindings6:
- address: fe80::e63d:1aff:fedc:1e60
netmask: 'ffff:ffff:ffff:ffff::'
network: 'fe80::'
mtu: 9000
netmask6: 'ffff:ffff:ffff:ffff::'
network6: 'fe80::'
scope6: link
virtual: true
link: true
identifier: bond0
managed: true
primary: false
provision: false
subnet:
subnet6:
tag: ''
attached_to: ''
type: Bond
attached_devices: ens1f0np0,ens1f1np1
mode: 802.3ad
bond_options: xmit_hash_policy=layer2+3 miimon=100
- ip: 10.60.1.101
ip6: ''
mac:
name: ostest.os.example.com
attrs: {}
virtual: true
link: true
identifier: bond0.601
managed: true
primary: true
provision: true
subnet:
name: OS MGMT 601 IPv4
network: 10.60.1.0
mask: 255.255.255.0
gateway: 10.60.1.230
dns_primary: 10.60.1.1
dns_secondary: 10.60.1.2
from: ''
to: ''
boot_mode: Static
ipam: None
vlanid: 601
mtu: 9000
nic_delay:
network_type: IPv4
description: ''
subnet6:
tag: '601'
attached_to: bond0
type: Interface
For whatever reasons attrs is empty for bond0.601 while bond0 shows some bindings.
Expected outcome:
Virtual interfaces should also list bindings and other interface facts.
Foreman and Proxy versions:
Foreman 3.1.2, Katello 4.3.1
Distribution and version:
CentOS 7.9