Project

General

Profile

Actions

Bug #31943

closed

Facter 4.x does not report uninitialized interfaces

Added by Dominic Schlegel about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Image
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

The newest FDI image version 3.7.3 is somehow acting differently collecting networking facts:

[root@fdi ~]# FACTERLIB=/usr/share/fdi/facts tfm-ruby /opt/theforeman/tfm/root/usr/bin/facter networking
{
  dhcp => "10.2.0.104",
  fqdn => "fdi.",
  hostname => "fdi",
  interfaces => {
    eno1 => {
      bindings => [
        {
          address => "10.2.240.156",
          netmask => "255.255.0.0",
          network => "10.2.0.0" 
        }
      ],
      bindings6 => [
        {
          address => "fe80::4adf:37ff:fe7f:3fb8",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "fe80::" 
        }
      ],
      dhcp => "10.2.0.104",
      ip => "10.2.240.156",
      ip6 => "fe80::4adf:37ff:fe7f:3fb8",
      mac => "48:df:XX:XX:XX:XX",
      mtu => 1500,
      netmask => "255.255.0.0",
      netmask6 => "ffff:ffff:ffff:ffff::",
      network => "10.2.0.0",
      network6 => "fe80::",
      scope6 => "link" 
    },
    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",
      scope6 => "host" 
    }
  },
  ip => "10.2.240.156",
  ip6 => "fe80::4adf:37ff:fe7f:3fb8",
  mac => "48:df:XX:XX:XX:XX",
  mtu => 1500,
  netmask => "255.255.0.0",
  netmask6 => "ffff:ffff:ffff:ffff::",
  network => "10.2.0.0",
  network6 => "fe80::",
  primary => "eno1",
  scope6 => "link" 
}

on this machine i have 2 x 10 Gbit/s interfaces that i can also see in the fdi:

[root@fdi ~]# ifconfig
eno1: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet 10.2.240.156  netmask 255.255.0.0  broadcast 10.2.255.255
        inet6 fe80::4adf:37ff:fe7f:3fb8  prefixlen 64  scopeid 0x20<link>
        ether 48:df:37:7f:3f:b8  txqueuelen 1000  (Ethernet)
        RX packets 30836  bytes 16855273 (16.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30235  bytes 1438550 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno2: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        ether 48:df:37:7f:3f:b9  txqueuelen 1000  (Ethernet)
        RX packets 12  bytes 2580 (2.5 KiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 19  bytes 1387 (1.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=329<UP,LOOPBACK,RUNNING,PROMISC>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The only difference between eno1 and eno2 seems to be that eno2 does not have any ip configuration. This should be working as 1 interfaces for provisioning in Foreman is enough. Due to the missing interface fact i am not able to deploy bonding devices.


Related issues 2 (1 open1 closed)

Related to Discovery - Bug #31826: Discovered nodes without default route cannot be processedNewLukas ZapletalActions
Related to Discovery - Refactor #24153: Refactor fdi to work with facter 4.xResolvedActions
Actions #1

Updated by Lukas Zapletal about 3 years ago

  • Subject changed from missing interface fact in FDI 3.7.3 to Facter 4.x does not report uninitialized interfaces
  • Priority changed from High to Normal
  • Triaged changed from No to Yes

Hello,

hmmm that's not good, we have upgraded to Facter 4 (from Facter 2.x) and this was not noticed. It looks like Facter 4 ignores interfaces which don't have IP address, it only parsers output from "ip -o address" and takes that as the input for list of interfaces. That's incorrect, it's a bug in Facter 4.0. We use 4.0.44 at the moment.

Lucky day for us tho, it looks like linux networking resolver was completely rewritten from scratch and it now uses proper linux interface to list available interfaces: https://github.com/puppetlabs/facter/pull/2219/files#diff-cfcddcca8f25c11150c733834776f2fa3bb3cca58844973fff403e17f8046100L36-R81 and this has been merged for 4.0.47. I think this should help in this case.

All we need to do to fix this is to update to 4.0.47 or newer.

Actions #2

Updated by Lukas Zapletal about 3 years ago

Step one: Update facter in our repos: https://github.com/theforeman/foreman-packaging/pull/6348

Step to: I will get you a nightly FDI build with the new facter

Step three: You report back and I can backport this into the release.

Actions #3

Updated by Lukas Zapletal about 3 years ago

  • Related to Bug #31826: Discovered nodes without default route cannot be processed added
Actions #4

Updated by Dominic Schlegel about 3 years ago

Hi Lukas

Thanks for your awesome work.

Just ping me the download URL for the nightly FDI build here and i will test it and report back.

Thanks & Regards

Actions #5

Updated by Lukas Zapletal about 3 years ago

Was busy but I am back, in case I forget follow this PR: https://github.com/theforeman/foreman-packaging/pull/6348

Then watch http://downloads.theforeman.org/discovery/nightly/ for a new release :-)

Soon. Get back to me with the results.

Actions #6

Updated by Dominic Schlegel about 3 years ago

  • Status changed from New to Resolved

The new FDI 3.7.5 is now showing interface facts for interfaces without ip address loaded:

[root@fdi ~]# FACTERLIB=/usr/share/fdi/facts tfm-ruby /opt/theforeman/tfm/root/usr/bin/facter networking
{
  dhcp => "10.2.0.104",
  fqdn => "fdi",
  hostname => "fdi",
  interfaces => {
    eno49 => {
      bindings => [
        {
          address => "10.2.240.178",
          netmask => "255.255.0.0",
          network => "10.2.0.0" 
        }
      ],
      bindings6 => [
        {
          address => "fe80::4adf:37ff:fe44:81f4",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "fe80::",
          scope6 => "link" 
        }
      ],
      dhcp => "10.2.0.104",
      ip => "10.2.240.178",
      ip6 => "fe80::4adf:37ff:fe44:81f4",
      mac => "48:df:37:44:81:f4",
      mtu => 1500,
      netmask => "255.255.0.0",
      netmask6 => "ffff:ffff:ffff:ffff::",
      network => "10.2.0.0",
      network6 => "fe80::",
      scope6 => "link" 
    },
    eno50 => {
      mac => "48:df:37:44:81:f5",
      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",
          scope6 => "host" 
        }
      ],
      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",
      scope6 => "host" 
    }
  },
  ip => "10.2.240.178",
  ip6 => "fe80::4adf:37ff:fe44:81f4",
  mac => "48:df:37:44:81:f4",
  mtu => 1500,
  netmask => "255.255.0.0",
  netmask6 => "ffff:ffff:ffff:ffff::",
  network => "10.2.0.0",
  network6 => "fe80::",
  primary => "eno49",
  scope6 => "link" 
}

Actions #7

Updated by Dominic Schlegel about 3 years ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/6348 added
Actions #8

Updated by Lukas Zapletal about 3 years ago

Actions #9

Updated by Lukas Zapletal about 3 years ago

  • Bugzilla link set to 1940857
Actions

Also available in: Atom PDF