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

facter error with IP aliases containing '@' (e.g. while running in Docker containers)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: FACT 2.4.4
    • Fix Version/s: None
    • Component/s: Community
    • Labels:
      None
    • Environment:

      Docker 1.9.1, running a SUSE Linux Enterprise 12 Container; within that container:

      • facter 2.4.4
      • puppet 3.8.4
    • Template:

      Description

      When running facter inside a Docker container I get an error about an invalid eth0 device.

      $ facter >/dev/null
      Device "eth0@if1009" does not exist.
      

      This is due the IP aliasing used by Docker

      $ ip a | grep eth0
      1008: eth0@if1009: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
      

      The error is quite similar to Bug #2414 and can be fixed by extending the regex used in the patch provided for Bug #2414 (see the Attachment).

      The error seems to be quite trivial at first as only the error message is printed (the return code doesn't seem to be affected), but this issue causes errors when 'puppet apply' is triggered by other tools (in my case Ansible) which interprets the message as an actual error and sets a return code != 0.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            bstierand Bjoern Stierand
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support

                  Time Tracking

                  Estimated:
                  Original Estimate - 30 minutes
                  30m
                  Remaining:
                  Remaining Estimate - 30 minutes
                  30m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified