[Pkg-puppet-devel] Bug#873292: facter: Bogus output received with interface named 'master'.

Steve Kemp skx at debian.org
Sat Aug 26 08:27:44 UTC 2017


Package: facter
Version: 2.4.6-1
Severity: minor

Dear Maintainer,

Since upgrading a virtual-machine host from jessie to stretch I started
seeing this email every hour, when puppet ran:

    To: root
    From: root(Cron Daemon)
    Cc:
    Subject: Cron <root at smaug> /usr/bin/puppet agent --onetime  ..

    Command line is not complete. Try option "help"

I eventually tracked this output down to factor, as I could see it when
running `facter --debug`:

    root at smaug ~ # facter --debug
    Found no suitable resolves of 1 for ec2_metadata
    ..
    value for macaddress_lo is still nil
    value for ipaddress_master is still nil
    value for ipaddress6_master is still nil
    Command line is not complete. Try option "help"
    value for netmask_master is still nil
    value for ipaddress_skx_mail is still nil

Eventually I tracked this output down to the following function :

   def self.get_bonding_master(interface)

(Which is present in /usr/lib/ruby/vendor_ruby/facter/util/ip.rb)

That runs:

    ip link show $interface

On my host that works for most interfaces, but not for master:

    root at smaug ~ # ip link show master
    Command line is not complete. Try option "help"

To resolve the problem I updated the code of that function from:

    ethbond = regex.match(%x{/sbin/ip link show '#{interface}'})

To:

    ethbond = regex.match(%x{/sbin/ip link show dev '#{interface}'})

I'm not 100% sure this is a bug, but I think it probably is ..



-- System Information:
Debian Release: 8.9
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Pkg-puppet-devel mailing list