Skip to content

Conversation

mlguerrero12
Copy link
Collaborator

@mlguerrero12 mlguerrero12 commented May 15, 2025

The bond-cni should not attempt to modify the mac addresses of slaves during deletion of the bond interface.
The bond driver takes care of reverting any modifications.

Only balance-tlb and balance-alb do not support slaves with same mac addresses. The plugin now handles mac duplicates only for these modes.

@mlguerrero12
Copy link
Collaborator Author

@Eoghan1232, @SchSeba, PTAL

@mlguerrero12 mlguerrero12 force-pushed the removehandleduplicatemacs branch 3 times, most recently from c92fbb2 to b2bbd8d Compare May 16, 2025 10:08
The bond-cni should not attempt to modify the mac addresses
of slaves during deletion of the bond interface.
The bond driver takes care of reverting any modifications.

Only balance-tlb and balance-alb do not support slaves with
same mac addresses. The plugin now handles mac duplicates
only for these modes.

Signed-off-by: Marcelo Guerrero <[email protected]>
@mlguerrero12 mlguerrero12 force-pushed the removehandleduplicatemacs branch from b2bbd8d to a10ffb1 Compare May 16, 2025 10:16
@mlguerrero12 mlguerrero12 changed the title Avoid handling mac duplication Avoid handling mac duplication during deletion May 16, 2025
"github.com/vishvananda/netlink"
"github.com/vishvananda/netns"

"github.com/intel/bond-cni/bond/util"
Copy link
Collaborator

Choose a reason for hiding this comment

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

just nice to have we should switch to project to github.com/k8snetworkplumbingwg/bond-cni

var err error

bondMode := netlink.StringToBondMode(mode)
if bondMode == netlink.BOND_MODE_BALANCE_TLB || bondMode == netlink.BOND_MODE_BALANCE_ALB {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we have a test to cover this new change that we handle mac duplication only for this two modes?

@SchSeba
Copy link
Collaborator

SchSeba commented May 27, 2025

and can you please rebase?

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.

2 participants