Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_net test fail in the calico network env #4973

Closed
xiaoge1001 opened this issue Feb 28, 2024 · 7 comments
Closed

test_net test fail in the calico network env #4973

xiaoge1001 opened this issue Feb 28, 2024 · 7 comments
Labels
bug Something isn't working correctly

Comments

@xiaoge1001
Copy link
Contributor

Bug report

RuntimeError: duplicate mac found! both 'calixxx' and 'caliyyy' have mac 'ee:ee:ee:ee:ee:ee'.

Steps to reproduce the problem

pytest tests/unittests/test_net.py

Environment details

  • Cloud-init version:23.4.1
  • Operating System Distribution:openeuler

cloud-init logs

2024-02-27 10:05:36                 msg = "duplicate mac found! both '%s' and '%s' have mac '%s'." % (
2024-02-27 10:05:36                     name,
2024-02-27 10:05:36                     ret[mac],
2024-02-27 10:05:36                     mac,
2024-02-27 10:05:36                 )
2024-02-27 10:05:36 >               raise RuntimeError(msg)
2024-02-27 10:05:36 E               RuntimeError: duplicate mac found! both 'caliaadab05bca1' and 'cali7a099f8b737' have mac 'ee:ee:ee:ee:ee:ee'.
2024-02-27 10:05:36 
2024-02-27 10:05:36 cloudinit/net/__init__.py:987: RuntimeError
@xiaoge1001 xiaoge1001 added bug Something isn't working correctly new An issue that still needs triage labels Feb 28, 2024
@xiaoge1001
Copy link
Contributor Author

Why do all cali* interfaces have the MAC address ee:ee:ee:ee:ee:ee?

reference:https://docs.tigera.io/calico/latest/reference/faq#why-do-all-cali-interfaces-have-the-mac-address-eeeeeeeeeeee

@catmsred
Copy link
Collaborator

Thank you for reporting this bug! 23.4.1 has been superceded by 23.4.4 -- are you able to reproduce this issue in 23.4.4 as well?

@catmsred catmsred self-assigned this Feb 28, 2024
@catmsred catmsred removed the new An issue that still needs triage label Feb 28, 2024
@catmsred catmsred removed their assignment Mar 1, 2024
@TheRealFalcon
Copy link
Member

pytest tests/unittests/test_net.py

test_net.py contains 223 tests. Can you provide the exact test or tests that failed?

@xiaoge1001
Copy link
Contributor Author

pytest tests/unittests/test_net.py

test_net.py contains 223 tests. Can you provide the exact test or tests that failed?

cloud-init-23.4.1:
https://gitee.com/src-openeuler/cloud-init/issues/I93ZJT?from=project-issue (See the attachment.)

@xiaoge1001
Copy link
Contributor Author

I will use the latest version for the past two days to test it as well.

@blackboxsw
Copy link
Collaborator

@xiaoge1001 I expect #5012 may solve the build issues you are seeing. If you get a chance to test #5012 in your environment it will help give us a signal as to whether this resolves the issue you filed.

blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Mar 6, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Mar 6, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Mar 6, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Mar 6, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Mar 6, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
@xiaoge1001
Copy link
Contributor Author

@xiaoge1001 I expect #5012 may solve the build issues you are seeing. If you get a chance to test #5012 in your environment it will help give us a signal as to whether this resolves the issue you filed.

Thank you very much. I have tested the latest code and this issue have solved.

catmsred pushed a commit to catmsred/cloud-init that referenced this issue Mar 11, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
TheRealFalcon pushed a commit to TheRealFalcon/cloud-init that referenced this issue Mar 19, 2024
Prevent disable_sysfs_net fixture from impacting TestSysDevPath
and TestReadSysNet in order to avoid shared mocks of /sys/class/net.
This avoid test artifact pollution for TestReadSysNet.

Adapt the following tests, dropping CiTestCase to use pytest:
 TestDHCPDiscoveryClean, TestSysDevPath, TestReadSysNet,
 TestGenerateFallbackConfig, TestNetFailOver, TestConvertNetJson

Fixes canonicalGH-4973
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants