Add check on network interface name's length

Bug #2027975 reported by DUFOUR Olivier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned
cloud-init
Fix Released
Unknown

Bug Description

When adding a VLAN on long network interfaces, Cloud-init will fail silently to add the sub-interfaces.

Deployed environment is :
* MAAS 3.3.4
* Server Dell R630 + Mellanox Connectx-5
* name of interfaces : enp130s0f0np0 / enp130s0f1np1
* add a VLAN like 100-4093

Cloud-Init will not display any error message but the VLAN interfaces will not be added after the deployment.
If trying to perform the operation manually, we are then greeted with the following error message.

```
ubuntu@R630:~$ sudo ip link add link enp130s0f0np0 name enp130s0f0np0.103 type vlan id 103
Error: argument "enp130s0f0np0.103" is wrong: "name" not a valid ifname
```

From Iproute2 and Kernel perspective, it is not possible to have interfaces with a name longer than 15 characters in total.

A quick workaround is simply to rename the network interface to something shorter.
Having a quick warning from MAAS would be nice to have to understand the origin of the issue.

Revision history for this message
Christian Grabowski (cgrabowski) wrote :

Can reproduce, moving to triaged.

Changed in maas:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Adam Collard (adam-collard) wrote :

Let's make MAAS not create names for interfaces that are > 15 characters long.

Cloud-init should reject the names if it's told to create interfaces that don't have valid names

Changed in maas:
milestone: none → 3.5.0
James Falcon (falcojr)
Changed in cloud-init:
importance: Undecided → Unknown
status: New → Unknown
Changed in cloud-init:
status: Unknown → New
Revision history for this message
James Falcon (falcojr) wrote :

The remote watcher automatically changed this bug to "New", which will cause problems with our triaging. Changing it back to manual. Please see https://github.com/canonical/cloud-init/issues/4743 for any updates on the cloud-init side

Changed in cloud-init:
importance: Unknown → Undecided
status: New → Triaged
Revision history for this message
Chad Smith (chad.smith) wrote :
Changed in cloud-init:
importance: Undecided → Unknown
status: Triaged → Unknown
Changed in cloud-init:
status: Unknown → New
Changed in cloud-init:
status: New → Fix Released
Changed in maas:
milestone: 3.5.0 → 3.5.x
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.