Skip to content

Avoid handling mac duplication during deletion #150

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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