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

Bug #1458322 reported by Maarten Rijke on 2015-05-24
366
This bug affects 75 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Medium
Unassigned
network-manager (Ubuntu)
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'.

Maarten Rijke (infie) wrote :
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
Maarten Rijke (infie) wrote :

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

Maarten Rijke (infie) on 2015-05-25
summary: - NetworkManager doesn't hide Docker's veth interfaces
+ NetworkManager doesn't hide virtual interfaces (e.g. Docker, VMWare)
jackyzy823 (jackyzy823) on 2015-10-05
information type: Public → Public Security
information type: Public Security → Public

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.

Willy Schott (willy-schott) wrote :

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

KrosseKrabbe (krossekrabbe) wrote :

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

KrosseKrabbe (krossekrabbe) wrote :

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

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...

Hamy (hamy-public1) wrote :

confirmed in xubuntu 16.10 with veth devices created by lxd

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

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.

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
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.

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 :)

Sergey Tikhonov (zimbler-n) wrote :

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

This one hides separators also.

Ubuntu 16.04, have the same issue

frankvielma (frankvielma) wrote :

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

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?

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

To post a comment you must log in.