Skip to content

macs: ignore duplicate MAC for devs with driver igc#6784

Open
xanthein wants to merge 1 commit intocanonical:mainfrom
xanthein:ignore_duplicate_mac
Open

macs: ignore duplicate MAC for devs with driver igc#6784
xanthein wants to merge 1 commit intocanonical:mainfrom
xanthein:ignore_duplicate_mac

Conversation

@xanthein
Copy link

@xanthein xanthein commented Mar 9, 2026

Add igc to duplicate MAC ignore list, fix #6782

Proposed Commit Message

In factory production, customer needs to login to the Ubuntu desktop
 or console before using the tool to flash the MAC address. we should 
ignore the duplicate mac exception in this case.

Fixes #6782 
LP: #2142651

Additional Context

Test Steps

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

In factory production, customer needs to login to the Ubuntu
desktop or console before using the tool to flash the MAC address.
we should ignore the duplicate mac exception in this case.
(LP: #2142651)
@blackboxsw blackboxsw self-assigned this Mar 10, 2026
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @xanthein for the submission to cloud-init.
I think we will need a bit of unit test coverage before we can land this

diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index 5b92ba280..338fc36dc 100644
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -5658,7 +5658,9 @@ class TestGetInterfacesByMac:
         assert expected == result
 
 
-@pytest.mark.parametrize("driver", ("mscc_felix", "fsl_enetc", "qmi_wwan"))
+@pytest.mark.parametrize(
+    "driver", ("igc", "mscc_felix", "fsl_enetc", "qmi_wwan")
+)
 @mock.patch("cloudinit.net.get_sys_class_path")
 @mock.patch("cloudinit.util.system_info", return_value={"variant": "ubuntu"})
 class TestDuplicateMac:

Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we can accept this proposal. Any system that has a single interface that uses this driver would be unable to boot with cloud-init. Searching online, I found at least one motherboard like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuntimeError: duplicate mac found! (driver: igc)

3 participants