Bug #20229
closedVirtual interface detection from facts not working unless there is an underscore in interface name
Description
I have a server with a number of virtual interfaces, eth0:0-eth0:16. All these are detected fine in Foreman as virtual interfaces attached to eth0, except the last one (eth0:16). I found this comment in 'services/puppet_fact_parser.rb':
"since Puppet converts eth0.0 and eth0:0 to eth0_0 we assume it's vlan interface"
Isn't that only true for older versions of puppet/facter? The puppet facts for my server has no underscore in the interface names, but I remember that they used to. I'm thinking that the interfaces that are detected correctly in Foreman are so because they were imported when interface names in facts were still named with underscores, whereas the last interface has been added after update to later puppet/facter version where this is not true.
I might be way off here though...
Updated by Marek Hulán over 7 years ago
could you please paste output of facter? it might be that the way fact names are based on identifier has changed
Updated by Adam Winberg over 7 years ago
Marek Hulán wrote:
could you please paste output of facter? it might be that the way fact names are based on identifier has changed
Facter output (slightly abbreviated):
aio_agent_version => 1.9.3 augeas => { version => "1.4.0" } networking => { hostname => "lxserv940", interfaces => { eth0 => { bindings => [ { address => "172.29.0.187", netmask => "255.255.252.0", network => "172.29.0.0" } ], bindings6 => [ { address => "fe80::250:56ff:febe:50d5", netmask => "ffff:ffff:ffff:ffff::", network => "fe80::" } ], ip => "172.29.0.187", ip6 => "fe80::250:56ff:febe:50d5", mac => "00:50:56:be:50:d5", mtu => 1500, netmask => "255.255.252.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "172.29.0.0", network6 => "fe80::" }, eth0:0 => { bindings => [ { address => "172.29.1.160", netmask => "255.255.252.0", network => "172.29.0.0" } ], ip => "172.29.1.160", netmask => "255.255.252.0", network => "172.29.0.0" }, 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" } }, ip => "172.29.0.187", ip6 => "fe80::250:56ff:febe:50d5", mac => "00:50:56:be:50:d5", mtu => 1500, netmask => "255.255.252.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "172.29.0.0", network6 => "fe80::", primary => "eth0" } os => { architecture => "x86_64", distro => { codename => "Maipo", description => "Red Hat Enterprise Linux Server release 7.3 (Maipo)", id => "RedHatEnterpriseServer", release => { full => "7.3", major => "7", minor => "3" }, specification => ":core-4.1-amd64:core-4.1-noarch" }, family => "RedHat", hardware => "x86_64", name => "RedHat", release => { full => "7.3", major => "7", minor => "3" }, selinux => { config_mode => "permissive", config_policy => "targeted", current_mode => "permissive", enabled => true, enforced => false, policy_version => "28" } }
Updated by Marek Hulán over 7 years ago
Thanks a lot, I suppose we need to update the puppet fact parser.
Updated by Marek Hulán almost 7 years ago
I guess we should drop the vlans type detection based on underscore once we drop puppet 3 support. Nested interfaces should work since puppet 4 support was introduced (haven't tried myself)
Updated by Ondřej Pražák over 6 years ago
- Related to Bug #24753: Deploying bonds and vlans does not work correctly added
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ondřej Pražák
- Pull request https://github.com/theforeman/foreman/pull/6033 added
Updated by Ondřej Pražák about 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 3371bd6d380316588fccc740a41b293ccfc0f250.