-
Notifications
You must be signed in to change notification settings - Fork 381
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
[windows] Fix bug in configureContainerLink #3089
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3089 +/- ##
==========================================
- Coverage 58.76% 58.06% -0.71%
==========================================
Files 292 293 +1
Lines 24724 24823 +99
==========================================
- Hits 14530 14414 -116
- Misses 8622 8828 +206
- Partials 1572 1581 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
The change itself LGTM. However, I didn't figure out how it resolves the issue in #3077, could you explain more details?
BTW, the signed email address seems wrong.
5e7f567
to
779b736
Compare
I think using the wrong parameter in isInfraContainer() could cause errors during reattach HNS Endpoint to the container. And this test failed due to the timeout waiting for connectivity test after updating pod label. |
I thought the changed code only affects the cleanup of HNSEndpoint when there was something wrong. When a Pod was recreated, did it encounter the attach error? Did you see the log "failed to configure container IP" when the test failed? /test-windows-networkpolicy
You also need to update the email address of your git setting and update the author and email of the patch to be consistent with the DCO sign. Currently DCO check failed:
|
We should use containerNetNS when deciding if a container is an infra one. Signed-off-by: Shuyang Xin <[email protected]>
779b736
to
ccdf733
Compare
Yes, I can see "failed to configure container IP" many times when test failed from the agent log. I thought it was because the endpoint was always removed after any non-pause container failed to attach the endpoint. This incorrect behavior happened because the isInfraContainer() function only return true at this time. After fixing this bug, there was no incorrect endpoint removing info in the log. The test can be passed with good connection status of the client pod.
The DCO check can pass this time, thanks for your reminder. |
@XinShuYang thanks for the explanation. Why wasn't there an issue before this change ff17f09? It seems it also removed the hnsendpoint unconditionally. Was it because of the change at ff17f09#diff-17bccd4a78564ad9445047f0815ca61a4590f9119a333b9f619a14c9c3999b9bL302? |
@tnqn Before ff17f09 , attachContainerLink() won't return error if non-pause container failed to attach endpoint. According to this commit, any container which failed to attach endpoint will return error, then isInfraContainer() should figure out whether it is a pause container. If it is not a pause container, we should never remove the endpoint. The new bug fix make the isInfraContainer() work correctly on windows. |
/test-windows-all |
@tnqn Hi quan, since this bug is blocking windows networkpolicy CI test, could you merge it first? |
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.
LGTM
/skip-e2e |
We should use containerNetNS when deciding if a container is an infra one.
Signed-off-by: Shuyang Xin [email protected]
Fixes #3077