NetworkManager doesn't hide virtual interfaces (e.g. Docker, VMWare)

Bug #1458322 reported by Maarten Rijke
388
This bug affects 80 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Confirmed
Medium
Unassigned
network-manager (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Previously in Ubuntu 14.04 NetworkManager hid the veth interfaces that were created by Docker.
Now since I've updated to 15.04 the veth interfaces are listed as Unmanaged under the gnome system tray icon which is kind of annoying.
I'm using docker 1.6.2 and network-manager 0.9.10.0-4ubuntu15.1

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: network-manager 0.9.10.0-4ubuntu15.1
ProcVersionSignature: Ubuntu 3.19.0-18.18-generic 3.19.6
Uname: Linux 3.19.0-18-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun May 24 14:22:44 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-08-29 (632 days ago)
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130214)
IpRoute:
 default via 192.168.178.1 dev wlan0 proto static metric 1024
 169.254.0.0/16 dev wlan0 scope link metric 1000
 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.42.1
 192.168.178.0/24 dev wlan0 proto kernel scope link src 192.168.178.40
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
SourcePackage: network-manager
UpgradeStatus: Upgraded to vivid on 2015-05-24 (0 days ago)
mtime.conffile..etc.NetworkManager.NetworkManager.conf: 2014-08-19T11:46:06.705439
nmcli-nm: Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code 2: Error: Object 'nm' is unknown, try 'nmcli help'.

Revision history for this message
Maarten Rijke (infie) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Changed in network-manager (Ubuntu):
importance: Undecided → Medium
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Maarten Rijke (infie) wrote :

Same applies to VMWare's virtual networks (vmnetX).

Maarten Rijke (infie)
summary: - NetworkManager doesn't hide Docker's veth interfaces
+ NetworkManager doesn't hide virtual interfaces (e.g. Docker, VMWare)
jackyzy823 (jackyzy823)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Michael Aquilina (michaelaquilina) wrote :

Is there a workaround for this? I can have a lot of docker images running at one go, which makes finding *actual* interfaces quite hard.

Revision history for this message
Willy Schott (willy-schott) wrote :

I can confirm that this issue still exists in Ubuntu 16.04 LTS.

Revision history for this message
KrosseKrabbe (krossekrabbe) wrote :

I have to scroll the network list to see my actual wifi networks because it shows all the docker veth* interfaces :-/

Revision history for this message
KrosseKrabbe (krossekrabbe) wrote :

16.10 and still the same shit. I'm gonna buy a fucking mac.

Revision history for this message
Leonardo Donelli (learts92) wrote :
Revision history for this message
Michael Stucki (mstucki) wrote :

There used to be a workaround with adding a "managed=false" entry to /etc/NetworkManager/NetworkManager.conf (see https://wiki.debian.org/NetworkManager#Wired_Networks_are_Unmanaged).

However, this does no longer seem to work on Ubuntu 16.04. Can anyone confirm? Has there been a change recently which broke this workaround?

Nevertheless, I think that the importance of this issue should be raised, and that a manual configuration change should not be necessary at all...

Revision history for this message
Hamy (hamy-public1) wrote :

confirmed in xubuntu 16.10 with veth devices created by lxd

Revision history for this message
Kevin (kupiakos) wrote :

Is there any reason the lines creating the menu entry can't just be removed? https://bazaar.launchpad.net/~vcs-imports/network-manager-applet/git-master/view/head:/src/applet.c#L1322

Revision history for this message
Oh the Huge Manatee (vertesi-n) wrote :

I tried it out on 1.2.2, since that's the version I have to work with. I also had to patch applet-device-ethernet.c , otherwise it still listed the header for each interface. Pushed my version up to https://github.com/ohthehugemanatee/network-manager-applet for convenience.

I only applied this hiding behavior to ethernet interfaces, because this ticket is specific to virtual ethernet interfaces from docker, vagrant, etc. I'm sure there are people who would like to hide other unmanaged interfaces, too. TBH I would prefer a flag for "show-unmanaged", but that discussion probably belongs in a separate ticket.

Patch attached. Sorry if the format isn't right, this is my first contribution here.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Hide unmanaged ethernet interfaces" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Mike Heffner (mikeh-fesnel) wrote :

Any update to this 2 year old ticket? Still seems to be a bug in NetworkManager-1.2.6, on Fedora 24.

Revision history for this message
Gabriel Samfira (gabriel-samfira) wrote :

any update on this? It is really annoying to use containers on a desktop system witn NetworkManager enabled. I get 12-15 network interfaces show up in my nm-applet. Can't even select a wifi network because of this in gnome-sehll. It's silly :)

Revision history for this message
Sergey Tikhonov (zimbler-n) wrote :

Previous patch successfully hides unmanaged eth interfaces, but it leaves menu separators.

This one hides separators also.

Revision history for this message
Viacheslav Semykrasov (7krasov) wrote :

Ubuntu 16.04, have the same issue

Revision history for this message
frankvielma (frankvielma) wrote :

Is there any solution about it ? (Ubuntu 16.04 with the same issue)

Revision history for this message
Brendan Brewster (bjbrewster) wrote :

I too am desperate for a solution (100+ Docker containers each with a veth)

How do we apply Sergey Tikhonov's patch to our local system?

Revision history for this message
Denis Franco (pumpkin-link) wrote :

@bjbrewster I'm following the patch applying tutorial from here https://superuser.com/questions/154717/how-to-apply-patch-to-gnome-on-ubuntu/175743

Revision history for this message
Bert Van de Poel (bhack) wrote :

This problem persists in 18.04 and is a big usability problem!

Revision history for this message
Lantizia (lantizia) wrote :

Have updated the patch to work with 18.04, here are the instructions I just used to build it (personally I builds like this in a VM)... ultimately you get the file 'network-manager-gnome_1.8.10-2ubuntu1_amd64.deb' and that is the only thing you need to install on normal 18.04 system where you want the fix...

sudo sed -i 's/^# \(deb-src \)/\1/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get build-dep network-manager-applet
wget http://archive.ubuntu.com/ubuntu/pool/main/n/network-manager-applet/network-manager-applet_{1.8.10.orig,1.8.10-2ubuntu1.debian}.tar.xz
tar xf network-manager-applet_*.orig.tar.xz
cd network-manager-applet-*/
tar xf ../network-manager-applet_*.debian.tar.xz
wget -P debian/patches http://gist.github.com/Lantizia/2f32f0ca8193a61ceefb0c8c95e92bcc/raw/hide_unmanaged_interfaces.patch
sed -i '1s/^/hide_unmanaged_interfaces.patch\n/' debian/patches/series
sudo dpkg-buildpackage -b
# Ignore the bit about not being able to sign it
# Only need to install 'network-manager-gnome_1.8.10-2ubuntu1_amd64.deb'

Revision history for this message
José Pedro Saraiva (nocive) wrote :

Unreal, 3 years later and this is still a thing.
It's not even an issue exclusive to ubuntu, it's present in most, if not all, linux distros and then we wonder why people have switched to OSX.

Revision history for this message
José Pedro Saraiva (nocive) wrote :
Revision history for this message
Lantizia (lantizia) wrote :

I'd much rather have something similar to that cinnamon fix as it actually seems to check if the device is listed as unmanaged. The patch I've supplied above (based on the earlier patch by Campbell Vertesi) doesn't seem to do that. Doesn't matter if my vmnet8 (or similar interface) is in the keyfile unmanaged-devices list or not.

Revision history for this message
Nathan Collins (ntc2) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for reporting it upstream

Changed in network-manager (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Vladimir Hidalgo (vlad88sv) wrote :

This is still an issue in Ubuntu 20.20

VMWare vmnet1 and vmnet2 are displayed in NetworkManager applet in Gnome

Revision history for this message
Luis Alberto Pabón (copong) wrote :

I managed to get Campbell's patch to hide unmanaged devices upstreamed:

https://gitlab.gnome.org/GNOME/network-manager-applet/-/merge_requests/93

Revision history for this message
Luis Alberto Pabón (copong) wrote :

Fix will come with network-manager-gnome 1.20.0.

To post a comment you must log in.