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

Ignoring duplicate macs for calico network #4975

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cloudinit/net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,15 @@ def get_interfaces_by_mac_on_linux() -> dict:
)
continue

if name.startswith("cali") and mac == "ee:ee:ee:ee:ee:ee":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there an associated network driver here unique to calico devices which we can check to align with other approaches just above this segment? Ideally we don't have to parse device name and specific mac match here.

We'd generally be able to find that driver via ls -l /sys/class/net/<calico_dev_name>/device/driver.

Also can we please provide an inline comment to link referencing: https://docs.tigera.io/calico/latest/reference/faq#why-do-all-cali-interfaces-have-the-mac-address-eeeeeeeeeeee for future us. when understanding the context of calico device behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there an associated network driver here unique to calico devices which we can check to align with other approaches just above this segment? Ideally we don't have to parse device name and specific mac match here.

We'd generally be able to find that driver via ls -l /sys/class/net/<calico_dev_name>/device/driver.

What is wrong with the current approach? Because I can't get the environment which the problem occurs. It's a CI environment and I don't have permission to log in. I added the print code to the cloud-init source and then obtained the information from the public build log.

Also can we please provide an inline comment to link referencing: https://docs.tigera.io/calico/latest/reference/faq#why-do-all-cali-interfaces-have-the-mac-address-eeeeeeeeeeee for future us. when understanding the context of calico device behavior?

The URL is too long. If I add it to a comment or note, the CI may fail.

LOG.debug(
"Ignoring duplicate macs from '%s' and '%s' due to "
"calico network.",
name,
ret[mac],
)
continue

msg = "duplicate mac found! both '%s' and '%s' have mac '%s'." % (
name,
ret[mac],
Expand Down
Loading