Project

General

Profile

Bug #20229

Virtual interface detection from facts not working unless there is an underscore in interface name

Added by Adam Winberg over 2 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Category:
Network
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

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...


Related issues

Related to Foreman - Bug #24753: Deploying bonds and vlans does not work correctlyClosed

Associated revisions

Revision 3371bd6d (diff)
Added by Ondřej Pražák 12 months ago

Fixes #20229 - Fix vlans and bonds deployment

History

#1 Updated by Marek Hulán over 2 years ago

could you please paste output of facter? it might be that the way fact names are based on identifier has changed

#2 Updated by Adam Winberg over 2 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" 
  }
}

#3 Updated by Marek Hulán over 2 years ago

Thanks a lot, I suppose we need to update the puppet fact parser.

#4 Updated by Marek Hulán almost 2 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)

#5 Updated by Ondřej Pražák about 1 year ago

  • Related to Bug #24753: Deploying bonds and vlans does not work correctly added

#6 Updated by The Foreman Bot about 1 year ago

  • Assignee set to Ondřej Pražák
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6033 added

#7 Updated by Ondřej Pražák 12 months ago

  • Status changed from Ready For Testing to Closed

#8 Updated by Tomer Brisker 12 months ago

  • Fixed in Releases 1.21.0 added

Also available in: Atom PDF