So the issue 26727 fixes situation when there’s just a bond as a primary interface, for example:
"macaddress": "3c:fd:fe:cd:77:a0",
"macaddress_bond0": "3c:fd:fe:cd:77:a0",
"macaddress_em1": "e4:43:4b:47:b4:50",
"macaddress_em2": "e4:43:4b:47:b4:51",
"macaddress_em3": "e4:43:4b:47:b4:52",
"macaddress_em4": "e4:43:4b:47:b4:53",
"macaddress_p5p1": "3c:fd:fe:cd:77:a0",
"macaddress_p5p2": "3c:fd:fe:cd:77:a1",
"macaddress_p7p1": "b4:96:91:40:9d:08",
"macaddress_p7p2": "b4:96:91:40:9d:0a",
However in your case I see you have a bond and VLAN on top of that:
"macaddress": "1c:b7:2c:0a:34:39",
"macaddress_backend": "b4:96:91:00:5a:58",
"macaddress_bond0": "1c:b7:2c:0a:34:39",
"macaddress_bond1": "b4:96:91:00:5a:58",
"macaddress_enp130s0f0": "b4:96:91:00:5a:58",
"macaddress_enp130s0f1": "b4:96:91:00:5a:5a",
"macaddress_enp3s0f0": "1c:b7:2c:0a:34:39",
"macaddress_enp3s0f1": "1c:b7:2c:0a:34:3a",
"macaddress_pe_customer_net": "1c:b7:2c:0a:34:39",
"macaddress_vlan106": "1c:b7:2c:0a:34:39",
This is tricky, facter reports MAC 1c:b7:2c:0a:34:39
as the primary interface which are actually multiple interfaces:
- enp3s0f0
- bond0
- pe_customer_net
- vlan106
Which one of these should be considered the primary one? I think it’s a problem and the limitation here is how facter reports this - just a MAC address is probably not enough to detect this complex scenario.
The answer probably lies in the facter 3.x (modern) facts which we don’t parse at the moment, just few basic things. It does contain key called “primary” which is set to “pe_customer_net” which I guess identifies your primary interface you want to be detected. However this is bunch of work - we need to refactor/rewrite our fact importing code, I am not sure when this is gonna happen.
The relevant bit is:
"networking": {
"domain": "ad1.myDomain.com",
"fqdn": "claas-pro-pg-n1.ad1.myDomain.com",
"hostname": "claas-pro-pg-n1",
"interfaces": {
"backend": {
"bindings": [
{
"address": "192.168.142.45",
"netmask": "255.255.255.0",
"network": "192.168.142.0"
}
],
"bindings6": [
{
"address": "fe80::49b:baff:fe99:d0db",
"netmask": "ffff:ffff:ffff:ffff::",
"network": "fe80::"
}
],
"ip": "192.168.142.45",
"ip6": "fe80::49b:baff:fe99:d0db",
"mac": "b4:96:91:00:5a:58",
"mtu": 1500,
"netmask": "255.255.255.0",
"netmask6": "ffff:ffff:ffff:ffff::",
"network": "192.168.142.0",
"network6": "fe80::"
},
"bond0": {
"bindings6": [
{
"address": "fe80::1eb7:2cff:fe0a:3439",
"netmask": "ffff:ffff:ffff:ffff::",
"network": "fe80::"
}
],
"ip6": "fe80::1eb7:2cff:fe0a:3439",
"mac": "1c:b7:2c:0a:34:39",
"mtu": 1500,
"netmask6": "ffff:ffff:ffff:ffff::",
"network6": "fe80::"
},
"bond1": {
"bindings6": [
{
"address": "fe80::b696:91ff:fe00:5a58",
"netmask": "ffff:ffff:ffff:ffff::",
"network": "fe80::"
}
],
"ip6": "fe80::b696:91ff:fe00:5a58",
"mac": "b4:96:91:00:5a:58",
"mtu": 1500,
"netmask6": "ffff:ffff:ffff:ffff::",
"network6": "fe80::"
},
"enp130s0f0": {
"mac": "b4:96:91:00:5a:58",
"mtu": 1500
},
"enp130s0f1": {
"mac": "b4:96:91:00:5a:5a",
"mtu": 1500
},
"enp3s0f0": {
"mac": "1c:b7:2c:0a:34:39",
"mtu": 1500
},
"enp3s0f1": {
"mac": "1c:b7:2c:0a:34:3a",
"mtu": 1500
},
"lo": {
"bindings": [
{
"address": "127.0.0.1",
"netmask": "255.0.0.0",
"network": "127.0.0.0"
}
],
"bindings6": [
{
"address": "::1",
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"network": "::1"
}
],
"ip": "127.0.0.1",
"ip6": "::1",
"mtu": 65536,
"netmask": "255.0.0.0",
"netmask6": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"network": "127.0.0.0",
"network6": "::1"
},
"pe_customer_net": {
"bindings": [
{
"address": "10.10.6.45",
"netmask": "255.255.255.0",
"network": "10.10.6.0"
}
],
"bindings6": [
{
"address": "fe80::1eb7:2cff:fe0a:3439",
"netmask": "ffff:ffff:ffff:ffff::",
"network": "fe80::"
}
],
"ip": "10.10.6.45",
"ip6": "fe80::1eb7:2cff:fe0a:3439",
"mac": "1c:b7:2c:0a:34:39",
"mtu": 1500,
"netmask": "255.255.255.0",
"netmask6": "ffff:ffff:ffff:ffff::",
"network": "10.10.6.0",
"network6": "fe80::"
},
"vlan106": {
"bindings6": [
{
"address": "fe80::1eb7:2cff:fe0a:3439",
"netmask": "ffff:ffff:ffff:ffff::",
"network": "fe80::"
}
],
"ip6": "fe80::1eb7:2cff:fe0a:3439",
"mac": "1c:b7:2c:0a:34:39",
"mtu": 1500,
"netmask6": "ffff:ffff:ffff:ffff::",
"network6": "fe80::"
}
},
"ip": "10.10.6.45",
"ip6": "fe80::1eb7:2cff:fe0a:3439",
"mac": "1c:b7:2c:0a:34:39",
"mtu": 1500,
"netmask": "255.255.255.0",
"netmask6": "ffff:ffff:ffff:ffff::",
"network": "10.10.6.0",
"network6": "fe80::",
"primary": "pe_customer_net"
},