Re: Bug in Network-Manager with virtual interfaces / new plugin



Hi,
here are the steps to reproduce the issue from a clean install of NM.
I'm running NM 0.9.10.0, Debian Jessie patches applied.
Ran update & dist-upgrade this morning.
As I said in my first mail, issue only appears when patch
0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch is applied.
My laptop is a Dell XPS L502X with WIFI (wlan0) and ethernet (eth0)
integrated interfaces.
Log file attached.

1 - Clean install of NM (default config)

2 - VMWare installed, partial output of ifconfig:
vmnet1    Link encap:Ethernet  HWaddr 00:50:56:c0:00:01  
          inet addr:172.16.89.1  Bcast:172.16.89.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:c0:00:08  
          inet addr:192.168.206.1  Bcast:192.168.206.255
Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I'm not sure steps 3-5 are needed, but I ran it like this..

3 - unplug ethernet cable
4 - reboot
5 - plug ethernet cable once started

At this stage, eth0 got a DHCP address, evthg OK.
Output of nmcli:

boul boulwok:~$ nmcli d
DEVICE  TYPE      STATE         CONNECTION         
eth0    ethernet  connected     Wired connection 1 
vmnet1  ethernet  connected     vmnet1             
vmnet8  ethernet  connected     vmnet8             
wlan0   wifi      disconnected  --                 
lo      loopback  unmanaged     --   

6 - From gnome control center:
 - Create na IPV4 fixed IP connection for eth0 named Fixed IP
 - Rename IPV4 default connection for eth0 (DHCP) to DHCP (probably
useless but makes it easier to read the logs)

7 - From gnome NM menu, connect eth0 using fixed IP settings.

This is still OK:

boul boulwok:~$ nmcli d
DEVICE  TYPE      STATE         CONNECTION 
eth0    ethernet  connected     Fixed IP   
vmnet1  ethernet  connected     vmnet1     
vmnet8  ethernet  connected     vmnet8     
wlan0   wifi      disconnected  --         
lo      loopback  unmanaged     --  

8 - Configure wlan0 for wpa connection (DHCP), in my case fripika

boul boulwok:~$ nmcli d
DEVICE  TYPE      STATE      CONNECTION 
eth0    ethernet  connected  Fixed IP   
vmnet1  ethernet  connected  vmnet1     
vmnet8  ethernet  connected  vmnet8     
wlan0   wifi      connected  fripika    
lo      loopback  unmanaged  --  

9 - Unplug ethernet cable

boul boulwok:~$ nmcli d
DEVICE  TYPE      STATE        CONNECTION 
vmnet1  ethernet  connected    vmnet1     
vmnet8  ethernet  connected    vmnet8     
wlan0   wifi      connected    fripika    
eth0    ethernet  unavailable  --         
lo      loopback  unmanaged    -- 

10 - Suspend-resume computer

This is where the problems begin to show. vmnet1 appears as connected
using the Fixed IP connection !

boul boulwok:~$ nmcli d
DEVICE  TYPE      STATE        CONNECTION 
vmnet1  ethernet  connected    Fixed IP   
wlan0   wifi      connected    fripika    
eth0    ethernet  unavailable  --         
vmnet8  ethernet  unmanaged    --         
lo      loopback  unmanaged    --  

And default route is set on vmnet1
boul boulwok:~/NM$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0         192.168.113.250 0.0.0.0         UG    1024   0        0
vmnet1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0
vmnet1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0
wlan0
192.168.113.0   0.0.0.0         255.255.255.0   U     0      0        0
vmnet1


On Mon, 2014-10-27 at 09:37 -0500, Dan Williams wrote:
On Fri, 2014-10-24 at 19:05 +0200, Nicolas Boulicault wrote:
Hi there,
Michael asked to forward this to the list, so here it is...

The patch 0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch
(debian Jessie) messes up with my virtual interfaces (vmware
vmnet1/vmnet8).

Could you run NM with --log-level=debug and reproduce the issue so that
we can get an idea of what NM is doing?

The goal is to still recognize these interfaces, but *not* touch them,
simply represent their current external state through the NM APIs and
command-line tools.  So if NM is somehow screwing up those devices by
changing their configuration, that would be a bug in NM, and we need to
find it and fix it.

Thanks!
Dan

Even if I set them manually unmanaged (from /etc/network/interfaces or
using keyfile plugin), they finally appear connected and make me lose my
internet connection if my ethernet link is down and I'm using WIFI.
I'm not sure exactly what's going on with the internals of
Network-Manager in this case but setting the default unmanaged flag on
the interfaces seems to have some negative side effects.
However, I think the idea of not managing the virtual interfaces is OK,
in particular for not expert users.
You'll find enclosed a small plugin that detects those virtual
interfaces and adds them to the unmanaged list. This is based on the
keyfile plugin.
Please feel free to use it (or not).
(0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch has to be
reverted for this plugin to work)

Thanks for your work anyway.

Nicolas
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list



Attachment: NM_issue_virt_ifaces.log
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]