Jira (FACT-2951) Facter 3 bad network for VirtualBox or VPN interfaces

5 views
Skip to first unread message

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 7:43:57 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
 
Facter / Bug FACT-2951
Facter 3 bad network for VirtualBox or VPN interfaces
Change By: Dorin Pleava
Summary: Facter 3 bad network for VirtualBox or VPN interfaces
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 7:43:57 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
On OSX(could be on other platforms as-well), when connected to a VPN, Facter 3 shows network incorrect. This can also be repr

Facter 3 uses `route -n get default` to get the primary interface(utun for VPN interfaces), and then runs `ipconfig getoption <VPN interface> server_identifier` to try to get the dhcp server. For some reason when running ipconfig getoption on interfaces that are used for VPN connection nothing is outputted.

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

 

The bug can be recreated without a VPN, by using VirtualBox:
# Install VirtualBox
# In VirtualBox, File -> Host Network Manager -> create a vboxnet0 adapter using 255.255.255.0 as IPv4 Network Mask

                 !image-2021-03-01-16-20-42-413.png|width=222,height=201!

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.

!image-2021-03-01-16-21-03-365.png|width=285,height=149!

I think facter 3 cannot read the vboxnet0 netmask using `ipconfig getoption vboxnet0 server_identifier` so it cannot calculate the network.

 
Reply all
Reply to author
Forward
0 new messages