-
Notifications
You must be signed in to change notification settings - Fork 292
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
🐛 Don't call session logout for keepAliveHandler #1949
Conversation
Welcome @xiujuanx! |
Hi @xiujuanx. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@srm09 Any chance of getting this reviewed and merged/released? |
pkg/session/session.go
Outdated
} | ||
if _, ok := sessionCache.Load(sessionKey); ok { | ||
logger.Info("clearing the session", "key", sessionKey) | ||
sessionCache.Delete(sessionKey) |
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.
Hi @xiujuanx , since sessionCache.Delete() is actually contains func (m *Map) LoadAndDelete(key any) (value any, loaded bool)
which will load&delete in an atomic way, so do we still need the check sessionCache.Load(sessionKey)
here?
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.
Thanks @zhanggbj for your review!
Indeed, we should not check if the key exists in the cache or not twice. I have changed the code, please help review it again. Thanks!
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.
cool, how about https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/1949/files#diff-59fbb0bb5dfeeb4f123f1e9e0a3d12c38a60b839e113b29868cb905755639e13R145, this could also be moved out.
3ea2a0b
to
e519592
Compare
/ok-to-test |
/ok-to-test |
/test pull-cluster-api-provider-vsphere-verify-gen |
1 similar comment
/test pull-cluster-api-provider-vsphere-verify-gen |
Thanks @zhanggbj ! I run |
/retest-required |
/test pull-cluster-api-provider-vsphere-verify-gen |
I think the issue should be fixed now, can you rebase? |
Thanks @sbueringer for your kind reminder! I have rebased the code, so pls help review again, thanks! |
/test pull-cluster-api-provider-vsphere-e2e |
1 similar comment
/test pull-cluster-api-provider-vsphere-e2e |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: randomvariable The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Let's cherry-pick this one as well /cherry-pick release-1.7 |
/cherry-pick release-1.6 |
/cherry-pick release-1.5 |
@sbueringer: new pull request created: #2027 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sbueringer: #1949 failed to apply on top of branch "release-1.6":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sbueringer: #1949 failed to apply on top of branch "release-1.5":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
We should not call session logout when keepAliveHandler. Once we call Logout, it means we send a stop signal to the handler. So when we reboot the VC, the keepAliveHandler finds the vCenter is down and we call logout, the keepAliveHandler will stop work. Also at this time, the VC is down, so logout will be stuck.
So this PR remove the session logout logic for keepAliveHandler, and keep session logout when the session is inactive.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1925
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: