canonical/cloud-init

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

Offen

#3.229 geöffnet am 11.05.2023

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (1.108 Forks)auto 404
buggood first issuelaunchpad

Repository-Metriken

Stars
 (3.772 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

This bug was originally filed in Launchpad as LP: #1788972

Launchpad user Chaynika Saikia(csaikia) wrote on 2018-08-25T01:59:40.367027+00:00

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

Contributor Guide