NetworkManager should provide default name for VLAN

Bug #1519120 reported by Mike Pontillo
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I tried to use the network manager UI to define a VLAN interface, and nothing happened. There are a few bugs here:

(1) When creating a VLAN interface through the UI, the "vlan interface name" must be filled in. This should just default to <interface-name>.<vid>, rather than being a required field. (I typed in "vlan100" to get the "Save" button to activate.)

(2) After creating my VLAN interface, nothing happened. No new interface appeared. I then realized that I had not installed the "vlan" package, and assumed that NetworkManager therefore could not complete configuration of the interface.

(3) After installing the 'vlan' package (and then telling NetworkManager to disconnect and reconnect my Ethernet interface from the UI, just for good measure), still no VLAN interfaces were present on my system.

I also tried editing the VLAN interface in the UI, and specifying "enp4s0f1.100", but still no VLAN interface came online.

# apt-cache policy network-manager
network-manager:
  Installed: 1.0.4-0ubuntu6
  Candidate: 1.0.4-0ubuntu6
  Version table:
 *** 1.0.4-0ubuntu6 0
        500 http://172.16.42.88/ubuntu/ xenial/main amd64 Packages
        100 /var/lib/dpkg/status

# apt-cache policy vlan
vlan:
  Installed: 1.9-3.2ubuntu1
  Candidate: 1.9-3.2ubuntu1
  Version table:
 *** 1.9-3.2ubuntu1 0
        500 http://172.16.42.88/ubuntu/ xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Mike Pontillo (mpontillo) wrote :

(For the record, 172.16.42.88 is my local mirror of us.archive.ubuntu.com and is updated hourly.)

Revision history for this message
Mike Pontillo (mpontillo) wrote : Re: Xenial: VLAN interfaces don't work until after a reboot

After I rebooted, the "vlan100" interface was created. So perhaps this bug just has to do with the fact that I tried to configure the a VLAN without the 'vlan' package installed.

summary: - Xenial: VLAN interfaces don't work when defined in the UI
+ Xenial: VLAN interfaces don't work until after a reboot
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
Revision history for this message
SwaJime (john-swajime) wrote :

This was working on 14.04.
Not working on 16.04.

root@acmu:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

root@acmu:~# apt-cache policy vlan
vlan:
  Installed: 1.9-3.2ubuntu1
  Candidate: 1.9-3.2ubuntu1
  Version table:
 *** 1.9-3.2ubuntu1 500
        500 http://192.168.1.20/ubuntu xenial/main i386 Packages
        500 file:/repo/debs i386/ Packages
        100 /var/lib/dpkg/status

root@acmu:~# uname -a
Linux acmu 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:34:49 UTC 2016 i686 i686 i686 GNU/Linux

root@acmu:~# cat /etc/network/interfaces | grep -A5 enp3s0.345
auto enp3s0.345
iface enp3s0.345 inet static
 address 239.192.21.5
 netmask 255.255.255.0
 network 239.192.21.0
 broadcast 239.192.21.255

root@acmu:~# ifup enp3s0.345
Cannot find device "enp3s0.345"
Failed to bring up enp3s0.345.

A reboot did not help.

Revision history for this message
Arnaud (shine-b) wrote :

I faced the same bug. After some quick research, I found a bug in the vlan script /etc/network/if-pre-up.d/vlan

It splits vlan number from interface name and creates vlan interface. It works with interface named eth, em, bond, vlan and doesn't work with systemd predictable network interfaces names (https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/).

Here is a patch,

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

The attachment "vlan.patch" 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
Sebastien Bacher (seb128) wrote :

thank you for your bug report, do you know where /etc/network/if-pre-up.d/vlan is coming from? it's not there on a default installation

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

the script comes from "vlan", the issue you describe seems another version of bug #948559

Robie Basak (racb)
Changed in vlan (Ubuntu):
importance: Undecided → High
Revision history for this message
Robie Basak (racb) wrote :

rbasak: looks straightforward enough to me; I've never used the vlan package though, but this looks plausible

tags: added: server-next
Robie Basak (racb)
Changed in vlan (Ubuntu):
assignee: nobody → Wesley Wiedenmeier (wesley-wiedenmeier)
Revision history for this message
Simon Déziel (sdeziel) wrote :

This is similar to LP: #1541678 which has a simpler and more generic patch.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

How does the script in /etc/network/if-pre-up.d have anything to do with this bug? I thought that was placed there for ifupdown. This bug is about configuring VLANs with Network Manager, so that script shouldn't be relevant here.

I just tried it again today on a freshly installed Xenial desktop. The steps I took were:

(0) Install the "vlan" package.
(1) Configure the VLAN interface in the Network Manager UI (with the expected name). (see screenshot)
(2) Go to the "IPv4 Settings" tab and configure the VLAN appropriately.

This all seems to work for me now. That said, the user experience isn't as nice as it could be. (Either the "vlan" package should be installed by default, or I should be prompted to install it.) And I have to type way too much redundant information in the UI. But it seems to be working properly for me now.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

I'll leave this bug open, because as an Ubuntu Desktop user, I would expect this to work properly out-of-the-box without installing a package or rebooting. (That is, I shouldn't have to figure out that I needed to install the "vlan" package to get it to work, as a desktop user trying to point-and-click.)

The user experience of the dialog in the screenshot is a separate concern.

Changed in vlan (Ubuntu):
status: New → Invalid
Revision history for this message
Wesley Wiedenmeier (wesley-wiedenmeier) wrote :

Since it looks like network-manager needs to pull in 'vlan' by default, here is a debdiff that adds it to recommends.

It may make sense to write a patch that grays out menu entries for network types which do not have the required deps installed, but this may have to wait until later.

Mathew Hodson (mhodson)
Changed in network-manager (Ubuntu):
importance: Undecided → High
importance: High → Low
tags: added: packaging
Robie Basak (racb)
summary: - Xenial: VLAN interfaces don't work until after a reboot
+ NetworkManager VLAN support fails unless vlan package is manually
+ installed
Revision history for this message
Robie Basak (racb) wrote : Re: NetworkManager VLAN support fails unless vlan package is manually installed

Actually, in hindsight after renaming the bug, it looks like there are two bugs identified here. 1) NetworkManager does not depend on or recommend the vlan package, and silently breaks when it isn't installed; and 2) from comments 4 and 5, there is a separate issue with a glob match for NICs in ifupdown.

Since Mike filed this bug originally, I think it makes sense to track this bug as the first issue. For the second issue, SwaJime and Arnaud, please could you use a separate bug to track this?

It's the second issue I spotted that caused me to assign Wes this bug, but thank you for looking at the NetworkManager GUI issue too!

One complication is that this change would pull vlan onto a bunch of CD images. I'd like feedback from the release or SRU teams before sponsoring this. Or, Mathieu, as this is Network Manager related, would you mind chiming in please?

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Another note: in addition to VLANs, NetworkManager lists other interface types for which the dependencies aren't installed as well:

    Bond
    Bridge
    Team

The "ifenslave" and "bridge-utils" package would be needed for bonds and bridges to work out of the box. (I think bridge-utils might already be present on Xenial server since LXD requires bridges, but I'm not sure about desktop.)

The "Team" option seems to be a Red Hat technology (in 'universe' in Ubuntu) which should probably be hidden from the menu unless the dependency is installed (separate issue).

In summary, I think that not having these packages installed by default is a usability problem for both Ubuntu Server and Ubuntu Desktop. IMHO, we should ensure the following packages are recommended by at least `network-manager` and possibly `ifupdown`:

    vlan
    bridge-utils
    ifenslave

Mathew Hodson (mhodson)
no longer affects: vlan (Ubuntu)
Revision history for this message
Phil Regnauld (regnauld-f) wrote :

This bug affects 16.04 LTS - the supplied patch above fixes the issue. Interfaces such as enp3s0.100 cannot be brought up without this.

Revision history for this message
Brian Candler (b-candler) wrote :

The second issue (not matching predictable NIC names) is #1541678

Revision history for this message
Martin Pitt (pitti) wrote :

The vlan merely provides integration into ifupdown, it is not required for NM at all. I cannot reproduce this -- I just added a VLAN device in NM and that works fine without the "vlan" package. However, you need to disconnect and re-connect the underlying device (or reboot), so I guess trying to install the package was a red herring. But keeping the bug open for the "must fill in vlan name" -- personally I think this is okay, but let's keep it as a wishlist bug.

summary: - NetworkManager VLAN support fails unless vlan package is manually
- installed
+ NetworkManager should provide default name for VLAN
Revision history for this message
Martin Pitt (pitti) wrote :

Unsubscribing sponsors as there are no applicable NM patches here.

Nish Aravamudan (nacc)
tags: removed: server-next
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.