macs: ignore duplicate MAC for devs with driver igc#6784
Open
xanthein wants to merge 1 commit intocanonical:mainfrom
Open
macs: ignore duplicate MAC for devs with driver igc#6784xanthein wants to merge 1 commit intocanonical:mainfrom
xanthein wants to merge 1 commit intocanonical:mainfrom
Conversation
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
requested changes
Mar 10, 2026
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
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:
holmanb
requested changes
Mar 11, 2026
Member
holmanb
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add igc to duplicate MAC ignore list, fix #6782
Proposed Commit Message
Additional Context
Test Steps
Merge type