Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-597

facter needs a package dependency on net-tools on rhel7 for ifconfig

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: FACT 1.7.6, FACT 2.0.2
    • Fix Version/s: FACT 2.2.0
    • Component/s: Community
    • Labels:
      None
    • Template:

      Description

      With RHEL 7, a minimal install doesn't even include an "ifconfig" binary. It's still available as /sbin/ifconfig if you install the "net-tools" package, but it's no longer required and guaranteed to be there.

      I've tried both facter 1.7.6 and facter 2.0.2, both from the PuppetLabs repo, and because neither package records a dependency on "net-tools" for RHEL 7, neither version will correctly gather the "interfaces" fact, at least on a system where a minimal install was done.

      $ cat /etc/redhat-release
      Red Hat Enterprise Linux Server release 7.0 (Maipo)
      $ type -a ifconfig
      -bash: type: ifconfig: not found
      $ facter --version
      2.0.2
      $ sudo facter | egrep 'interface'
      interfaces =>
      $ sudo yum whatprovides /sbin/ifconfig
      net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools
      Repo : rhel-x86_64-server-7
      Matched from:
      Filename : /sbin/ifconfig
      $ sudo yum install net-tools
      $ sudo facter | egrep 'interfaces'
      interfaces => ens192,ens224,lo

      The easy, short-term fix is to update the package so that for RHEL 7, facter also requires that "net-tools" is installed.

      Note that I've linked this issue to FACT-184, since Red Hat has indicated that ifconfig is now deprecated and "ip" should be used instead. In addition, the release notes for RHEL 7 indicate that the output format from ifconfig has changed somewhat, though apparently facter is still able to parse it correctly, as once the net-tools package is installed, the "interfaces" fact is correctly populated.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  solstice Tim Mooney
                  QA Contact:
                  Eric Thompson
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: