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

0 views
Skip to first unread message

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 6:53:56 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
 
Facter / Bug FACT-2951
Facter 3 bad network for VirtualBox or VPN network interfaces
Change By: Dorin Pleava
 The bug can be recreated without a VPN When running `facter networking.interfaces` with facter 3 , by using I get a different network on VirtualBox interfaces than running the same command with facter 4. This bug requires the following configuration in 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.

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

Facter I think facter 3 gets the network informations form here  [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 comes are empty.

 

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

 

 
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, 6:58:56 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
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:

# 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!

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.
{code:java}
% 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"
}{code}
 

 

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 6:58:57 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava commented on Bug FACT-2951
 
Re: Facter 3 bad network for VirtualBox or VPN network interfaces

Claire Cadman I think this issue can be marked as a known issue for the moment.

Mihai Buzgau (Jira)

unread,
Mar 2, 2021, 7:28:56 PM3/2/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Mar 2, 2021, 7:28:56 PM3/2/21
to puppe...@googlegroups.com

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 7:43:57 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
Change By: Dorin Pleava
Summary:
Facter 3 bad network for VirtualBox or VPN network interfaces

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 7:53:56 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.

Also, when connected to a VPN, Facter 3 shows network incorrect.

Facter 3 gets the network informations form here
  [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 comes empty.


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

 

 

Dorin Pleava (Jira)

unread,
Mar 2, 2021, 7:58:56 PM3/2/21
to puppe...@googlegroups.com
Dorin Pleava updated an issue
Change By: Dorin Pleava
Acceptance Criteria: When connected to a VPN, running `facter network networking.interfaces ` with facter 3, i 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`

Claire Cadman (Jira)

unread,
Mar 5, 2021, 5:49:01 AM3/5/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: known-issue-added knownissue

Claire Cadman (Jira)

unread,
Mar 8, 2021, 3:22:01 AM3/8/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Apr 16, 2021, 5:35:01 AM4/16/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed known-issue-added knownissue
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 21, 2022, 2:05:03 PM4/21/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Component/s: Facter 3
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 21, 2022, 2:06:05 PM4/21/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-2951
 
Re: Facter 3 bad network for VirtualBox or VPN network interfaces

Thank you for reporting this issue. While we agree this is likely an improvement, we do not anticipate addressing this any time soon due to other issues demanding precedence. As such, this ticket will be closed as “Won’t Do”. We may revisit this at a later time, and if so, will re-open this ticket.

If you are interested in submitting a patch to implement this issue, please open a pull request and re-open this ticket.

Reply all
Reply to author
Forward
0 new messages