Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-891

Not all IP addresses are exposed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.0
    • Component/s: Environment Detection
    • Labels:
      None

      Description

      At least on Linux, not all IP addresses are exposed for interfaces that are assigned addresses.

      E.g.:

      $ ip addr show
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
      inet 127.0.0.1/8 scope host lo
      2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
      inet 127.0.0.2/32 scope host venet0
      inet 199.XXX.XXX.XXX/32 scope global venet0:0
      inet 172.16.63.193/16 scope global venet0:17
      $ sudo cf-promises -v | grep Hard | tr ' ' '\n' | grep ipv4
      ipv4_127
      ipv4_127_0
      ipv4_127_0_0
      ipv4_127_0_0_2
      <pre>
      $ cat cf.ip_addr
      bundle agent ip_addr {

      reports:

      cfengine::

      "sys.ip_addresses: ${sys.ip_addresses}";
      "sys.ipv4: ${sys.ipv4}";
      "sys.ipv4[${sys.interfaces}]: ${sys.ipv4[${sys.interfaces}]}";
      "sys.ipv4_1[${sys.interfaces}]: ${sys.ipv4_1[${sys.interfaces}]}";
      "sys.ipv4_2[${sys.interfaces}]: ${sys.ipv4_2[${sys.interfaces}]}";
      "sys.ipv4_3[${sys.interfaces}]: ${sys.ipv4_3[${sys.interfaces}]}";

      }
      </pre>
      $ sudo cf-agent -f ./cf.ip_addr -b ip_addr
      R: sys.ip_addresses: 127.0.0.2
      R: sys.ipv4: 127.0.0.2
      R: sys.ipv4[venet0]: 127.0.0.2
      R: sys.ipv4_1[venet0]: 127
      R: sys.ipv4_2[venet0]: 127.0
      R: sys.ipv4_3[venet0]: 127.0.0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10025 Volker Hilsheimer (Inactive)
                Reporter:
                bahamat Brian Bennett
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel