canonical / canonical/cloud-init

cloud-init should not treat MAC addresses as case sensitive

Open
#3,672 4 comments 0 reactions 0 assignees View on GitHub
bug 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: #1876363](https://bugs.launchpad.net/cloud-init/+bug/1876363)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2020-05-01T19:12:49.938843+00:00
date_fix_committed = None
date_fix_released = None
id = 1876363
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1876363
milestone = None
owner = bospoort
owner_name = GM van de Bospoort
private = False
status = triaged
submitter = bospoort
submitter_name = GM van de Bospoort
tags = []
duplicates = []

_Launchpad user **GM van de Bospoort(bospoort)** wrote on 2020-05-01T19:12:49.938843+00:00_

Currently, cloud-init can run into issues applying network configuration if the MAC addresses reported by the system are in a different case to the MAC addresses provided by the network configuration source. It is likely that there are also other places where a mismatch could happen. We should ensure that cloud-init's MAC address handling is not case sensitive.

[Original Report]

I'm using an ISO with the following yaml in network-config. cloud-init will not match eth0, but will match eth1 due to capitalization.

version: 2
ethernets:
  eth0:
    match:
      macaddress: 00:15:5D:0E:AE:0C
    set-name: External
  eth1:
    match:
      macaddress: 00:15:5d:0e:ae:0d
    set-name: Internal

RuntimeError: Not all expected physical devices present: {'00:15:5D:0E:AE:0C'}

cloudinit/net/__init__.py, Line 545, in wait_for_physdevs.

Can you either fix the documentation to explicitly require lower case (this page has several uppe case references: https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html). Or do the lower case conversion in wait_for_physdevs when you compare the present_macs to the expected_macs?

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.