canonical / canonical/cloud-init

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

Open
#3,229 3 comments 0 reactions 0 assignees View on GitHub
bug good first issue launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1788972](https://bugs.launchpad.net/cloud-init/+bug/1788972)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2018-08-25T01:59:40.367027+00:00
date_fix_committed = None
date_fix_released = None
id = 1788972
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1788972
milestone = None
owner = csaikia
owner_name = Chaynika Saikia
private = False
status = triaged
submitter = csaikia
submitter_name = Chaynika Saikia
tags = ['bitesize', 'cloud-init']
duplicates = []

_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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.