-
Notifications
You must be signed in to change notification settings - Fork 260
Set constant mac for host veth interface in transparent vlan mode #1906
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
…add and removes route add by ADD call
| } | ||
|
|
||
| // Create veth pair | ||
| if err = client.netUtilsClient.CreateEndpoint(client.vnetVethName, client.containerVethName, mac); err != nil { |
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.
Shouldn't we update the test cases as we are now assigning a constant mac ?
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.
yep good catch. let me fix it
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.
can you point me to test case which need to be updated?
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.
UT abstract creation of host veth interface..so need to update UT for this
network/snat/snat_linux.go
Outdated
|
|
||
| /** | ||
| /* | ||
| * |
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.
same
…working into tamanoha/transvlan_macaddr
6738b8a to
c1013dc
Compare
c1013dc to
f39c515
Compare
vipul-21
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.
Can we update the description with the other changes in the PR as well? like using containerId now to fetch the endpoint to delete, updating how namespaces are being created etc
|
|
||
| ifIndex = devIf.Index | ||
| } else { | ||
| } else if interfaceName != "" { |
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.
Was this failing in a case where interfaceName is empty ?
Then should we add another else and log the error or something.
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.
it would not fail but skip deleting the route if interface not provided but the requirement is to delete route even if interface name not provided
| return errors.Wrap(err, "failed to remove routes") | ||
| } | ||
|
|
||
| routesLeft, err := getNumRoutesLeft() |
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.
Why are we removing the getNumRoutesLeft ?
And if we need to remove the func, we can remove from the fucn parameters as well then
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.
not required.. but i wanted to reevaluate this in future. so keeping it
vipul-21
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.
Let's update the description of PR as well with the new changes added in the PR.
9720c7a to
fe952ca
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Reason for Change:
This PR adds constant mac (aa:aa:aa:aa:aa:aa) for host veth interface. This prevents kernel to allocate unique mac for each host veth interface. Transparent mode already has this change and doing the same for transparent vlan mode here. Also from ubuntu22, we saw mac address getting changed after veth creation and arp entry set to wrong mac due to this. This prevents that if transparent-vlan mode used in ubuntu22 or later.
Issue Fixed:
Requirements:
Notes: