cloud-init network config 2 rename does not match with name

Bug #1788972 reported by Chaynika Saikia
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

Looking at the source code of cloud-init, when it tries to read a network configuration file, it looks for MAC address. Looking at the source code, it gives an impression that MAC address is a requirement to rename interfaces.

However, looking at this documentation, https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html , it mentions that if I want to rename a network interface, I can use either name, macaddress or driver.

This is the most misleading part because, firstly, the source code does NOT search through 'name' and uses 'device_id' instead, whereas the documentation says:
"name: <(scalar)>

Current interface name. Globs are supported, and the primary use case for matching on names, as selecting one fixed name can be more easily achieved with having no match: at all and just using the ID (see above). Note that currently only networkd supports globbing, NetworkManager does not."

tags: added: cloud-init
Revision history for this message
Ryan Harper (raharper) wrote :

Hi,

Thanks for filing the bug. You're right that the current code does not handle interface renames when using netplan (v2) config during boot which means that the only currently supported rename operations happen if a macaddress is provided.

Changed in cloud-init:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
M (martenbe) wrote :

I was looking for a few days until I found this bug report. The documentation and behavior still don't match: is there any update on this?

Revision history for this message
Alberto Contreras (aciba) wrote :

Thanks, martenbe, for pinging about this issue. AFAIK, there is no update about this but it should be addressed and clarified in the docs.

Tracking in SC-1464.

tags: added: bitesize
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.