[backend] MAAS uses a heuristic to find VLAN interface VIDs rather than /proc/net/vlan

Bug #1620012 reported by Mike Pontillo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned

Bug Description

This bug probably affects MAAS 1.9 and beyond.

I was testing MAAS in a virtual machine and used 'modprobe 8021q' followed by 'vconfig add <interface> <vid>' and then 'ifconfig <interface> <ip-address> netmask <netmask>' to configure a VLAN interface.

Oddly, I didn't see the interface appear in the 'ifconfig' output, and there were errors. So this was unexpected. But checking `dmesg`, it seems the kernel decided to rename these interfaces for some reason:

[1068987.275963] 8021q: 802.1Q VLAN Support v1.8
[1068987.289617] rename5: renamed from ens3.23
[1069031.651986] rename6: renamed from ens3.24

I had a MAAS rack controller running on this machine, which dutifully reported the "renameN" interfaces to the region, and then created them, *without* their associated VLAN IDs attached.

A better way to discover the VLAN IDs (rather than what we currently do, which is, I think, to look at the ".<vid>" text appended to the interface name) would be to check the files in /proc/net/vlan (whose names will match the VLAN interfaces) to see which VIDs they are associated with (which is available in the contents of the proc file). Unfortunately, the files are owned by root with permissions of -rw-------, so a 'sudo' entry will be needed in order to do this, and a trusted script to read the VID out of the file.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I have the same issue. My interfaces are configured via netplan, and I renamed them for my own clarity since I did not want MAAS to manage everything, and it would make it simpler to remember what VLAN is what.

Attached is the dump from maas-rack support-dump --networking.

Changed in maas:
milestone: none → 2.4.x
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Attaching the netplan.yaml config that causes this to fail. I get errors in maas.log:

Feb 5 14:25:11 demeter maas.node: [error] Unable to correctly identify VLAN for interface 'maas' on controller 'demeter'. Placing interface on VLAN 'fabric-0.0' without address assignments. Feb 5 14:25:11 demeter maas.node: [error] Unable to correctly identify VLAN for interface 'pxeboot' on controller 'demeter'. Placing interface on VLAN 'fabric-0.0' without address assignments.

This is because, as per description, MAAS can't figure out the VID for the interfaces based on name, it doesn't appear to be checking anything else currently.

If the interfaces are renamed to "vlan10" and "vlan15", things are immediately updated in MAAS to behave correctly.

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

Bumping this from Medium to High since the introduction of Netplan raises the probability of users encountering this bug.

Changed in maas:
importance: Medium → High
Changed in maas:
milestone: 2.4.x → 2.5.x
summary: - MAAS uses a heuristic to find VLAN interface VIDs rather than
+ [backend] MAAS uses a heuristic to find VLAN interface VIDs rather than
/proc/net/vlan
Changed in maas:
milestone: 2.5.x → next
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
Changed in maas:
milestone: next → none
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.