-
Notifications
You must be signed in to change notification settings - Fork 399
bond: T8084: disallow bond members that do not support MAC changes #4911
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
Conversation
|
👍 |
…g.Section Aggregated / bonded interfaces do only work with ethernet interfaces as underlaying link. There is no need to "dynamically" detect that eth0, eth1 or any other interface starting with eth is an ethernet interface. Remove calls to vyos.ifconfig.Section().
Consolidate repeated helper function calls used for both bonded and non-bonded Ethernet interfaces, resulting in cleaner and more maintainable code.
Add a safeguard to block MAC address changes when the underlying driver is ENA (used on AWS EC2), and display a clear error message instead of raising "OSError: [Errno 95] Operation not supported."
Building on commit ba60266 (“ethernet: T8084: prevent MAC changes on ENA interfaces (AWS EC2)”), add safeguards to prevent interfaces from being used as bond members if they: * do not support MAC address changes, or * appear on a denylist of interfaces invalid for bonding (currently empty)
|
Tested on aws t3.medim instance (ena driver): aws c4.2xlarge instance (ixgbevf driver): |
|
CI integration 👍 passed! Details
|
sever-sever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add list of unsupported ethernet drivers for interface bonding to avoid errors.
If and interface cannot change its own MAC address, assume it is. not bondable.
natali-rs1985
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallows adding bond members that don't support MAC address changes - helps prevent bonding issues
Change summary
This commit series hardens bonding support and simplifies related code.
It prevents interfaces from joining a bond if they cannot change MAC addresses, including explicit handling for ENA interfaces on AWS EC2 with clear error messages instead of generic failures. It also refactors bond verification to remove duplicated logic and drops dynamic interface type detection, simplifying the code by assuming Ethernet-only bond underlays.
Types of changes
Related Task(s)
Related PR(s)
How to test / Smoketest result
virtio_netdriver to the list of disallwoed drivers and errors got emitted.Checklist: