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

Facter 3 bad network for VirtualBox or VPN network interfaces

    XMLWordPrintable

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      When running `facter networking.interfaces` with facter 3, I get a different network on VirtualBox interfaces than running the same command with facter 4. I assume facter 3 output is incorrect as `facter networking.interfaces.vboxnet0.ip` matches the `facter networking.interfaces.vboxnet0.network`. `facter networking.interfaces.vboxnet0.network should show the correct network`

      Show
      When running `facter networking.interfaces` with facter 3, I get a different network on VirtualBox interfaces than running the same command with facter 4. I assume facter 3 output is incorrect as `facter networking.interfaces.vboxnet0.ip` matches the `facter networking.interfaces.vboxnet0.network`. `facter networking.interfaces.vboxnet0.network should show the correct network`
    • Team:
      Night's Watch
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      When running `facter networking.interfaces` with facter 3, I get a different network on VirtualBox interfaces than running the same command with facter 4. This bug requires the following configuration in VirtualBox:

      1. Install VirtualBox
      2. In VirtualBox, File -> Host Network Manager -> create a vboxnet0 adapter using 255.255.255.0 as IPv4 Network Mask

                      

      3. Edit/Create a virtual machine, go to machine settings -> Network, and make sure one Adapter is `Host-Only Adapter` that uses your vboxnet0.

      4. Start the VM, and locally, run puppet facts diff.

      This bug also reproduces when connected to a VPN, and comparing network interfaces used for VPN connection (utun0, utun1 ...).

      I think facter 3 gets the network informations form https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/bsd/networking_resolver.cc#L29  but the netmask data for VPN interfaces and VirtualBox are empty.

      Facter 4 relies on `ifconfig` command and it works as expected.

      % puppet facts diff | jq
      {
       "network_vboxnet0": {
       "new_value": "192.168.99.0",
       "old_value": "192.168.99.1"
       },
       "networking.interfaces.vboxnet0.bindings.0.network": {
       "new_value": "192.168.99.0",
       "old_value": "192.168.99.1"
       },
       "networking.interfaces.vboxnet0.network": {
       "new_value": "192.168.99.0",
       "old_value": "192.168.99.1"
      }

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dorin.pleava Dorin Pleava
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support