cloud-init should not treat MAC addresses as case sensitive

Bug #1876363 reported by GM van de Bospoort
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Low
Unassigned

Bug Description

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?

Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi,

Thanks for the bug report! I've filed bug 1876941 specifically for the documentation changes you suggested, and I'm going to rework this bug report slightly to cover fixing the underlying problem.

Dan

summary: - network-config macaddress needs to be lower case
+ cloud-init should not treat MAC addresses as case sensitive
Revision history for this message
GM van de Bospoort (bospoort) wrote : RE: [EXTERNAL] [Bug 1876363] Re: network-config macaddress needs to be lower case

Thank you Dan. Let me know if I can help.

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Dan Watkins
Sent: Tuesday, May 5, 2020 8:12 AM
To: Maarten Van De Bospoort <email address hidden>
Subject: [EXTERNAL] [Bug 1876363] Re: network-config macaddress needs to be lower case

Hi,

Thanks for the bug report! I've filed bug 1876941 specifically for the documentation changes you suggested, and I'm going to rework this bug report slightly to cover fixing the underlying problem.

Dan

** Summary changed:

- network-config macaddress needs to be lower case
+ cloud-init should not treat MAC addresses as case sensitive

--
You received this bug notification because you are subscribed to the bug report.
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fbugs%2F1876363&amp;data=02%7C01%7Cmaartenb%40microsoft.com%7Ce43f93cc5a5647f3b23c08d7f107e211%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637242889007745276&amp;sdata=gw9hXhRhb37rAlU%2Foe%2Fvx7RoLMY46kzu%2BhW3YjlMbKc%3D&amp;reserved=0

Title:
  cloud-init should not treat MAC addresses as case sensitive

Status in cloud-init:
  New

Bug description:
  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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcloudinit.readthedocs.io%2Fen%2Flatest%2Ftopics%2Fnetwork-config-&amp;data=02%7C01%7Cmaartenb%40microsoft.com%7Ce43f93cc5a5647f3b23c08d7f107e211%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637242889007745276&amp;sdata=KxLgXJ9%2B%2FOdt3P2e3Sb0%2BAnVK6SSMmXNgmQYSbtdcng%3D&amp;reserved=0
  format-v2.html). Or do the lower case conversion in wait_for_physdevs
  when you compare the present_macs to the expected_macs?

To manage notifications about this bug go to:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fcloud-init%2F%2Bbug%2F1876363%2F%2Bsubscriptions&amp;data=02%7C01%7Cmaartenb%40microsoft.com%7Ce43f93cc5a5647f3b23c08d7f107e211%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637242889007745276&amp;sdata=92P5Nf7lbKS5Xtl25nRRigMf%2FUvliYAidnsiyGhzBT8%3D&amp;reserved=0

Dan Watkins (oddbloke)
description: updated
Ryan Harper (raharper)
Changed in cloud-init:
importance: Undecided → High
status: New → Triaged
Brett Holman (holmanb)
Changed in cloud-init:
assignee: nobody → Brett Holman (holmanb)
Brett Holman (holmanb)
Changed in cloud-init:
assignee: Brett Holman (holmanb) → nobody
Revision history for this message
James Falcon (falcojr) wrote :

Since we've updated the docs to accurately specify and show examples of lowercase, I'm demoting the importance of dealing with the rest of this.

Changed in cloud-init:
importance: High → Low
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.