-
Notifications
You must be signed in to change notification settings - Fork 260
fix: use "vEthernet (LoopbackAdapterHostNCConnectivity)" when CNS is … #3693
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
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.
Pull Request Overview
This PR updates the loopback adapter name used in CNS to explicitly reference the vEthernet adapter when checking for the existence of the required network interface.
- Updated the loopback adapter name constant to "vEthernet (LoopbackAdapterHostNCConnectivity)".
- Modified the interface existence check to use the updated constant.
Comments suppressed due to low confidence (1)
cns/hnsclient/hnsclient_windows.go:57
- [nitpick] Consider renaming 'vEthernethostNCLoopbackAdapterName' to 'vEthernetHostNCLoopbackAdapterName' for improved readability and consistent camel casing relative to the previously defined 'hostNCLoopbackAdapterName'.
vEthernethostNCLoopbackAdapterName = "vEthernet (LoopbackAdapterHostNCConnectivity)"
bf4b418 to
16e2cde
Compare
16e2cde to
c1c1c4e
Compare
c1c1c4e to
d3c9b1f
Compare
a1cd2d8 to
6dc6e58
Compare
…checking for existance of loopback adapter for Apipa network Creation.
6dc6e58 to
eb0cd87
Compare
santhoshmprabhu
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 please add a UT?
santhoshmprabhu
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.
Approving to expedite fix for Sev2, tests to be added in follow up.
Will do a UT on a follow up PR |
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Pull Request Overview
This PR fixes an issue where the wrong network interface name was used when checking for existing loopback adapters in the CNS code. Key changes include introducing a new constant for the vEthernet loopback adapter name and updating the interface existence check to cover both adapter naming schemes.
Comments suppressed due to low confidence (1)
cns/hnsclient/hnsclient_windows.go:57
- [nitpick] The constant name 'vEthernethostNCLoopbackAdapterName' could be improved for clarity and consistency; consider renaming it to 'vEthernetHostNCLoopbackAdapterName'.
vEthernethostNCLoopbackAdapterName = "vEthernet (" + hostNCLoopbackAdapterName + ")"
…3693 Co-authored-by: behzad-mir <[email protected]>
#3693) fix: use "vEthernet (LoopbackAdapterHostNCConnectivity)" when CNS is checking for existance of loopback adapter for Apipa network Creation.
The CNS code currently will call to the net.InterfaceByName(LoopbackAdapterHostNCConnectivity) to check for the existing Loopback interface when the Loopback adapter has not been created for Apipa HNSNetwork. This change will make CNS to also check for existence of the interface: "vEthernet (LoopbackAdapterHostNCConnectivity)" in case that HNSNetwork Has not been rehydrated, and the loopback interface is leaked.
Reason for Change:
Issue Fixed:
Requirements:
Notes: