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
Fix leader election lock release when using LeaseLocks #80954
Conversation
Welcome @zachomedia! |
Hi @zachomedia. Thanks for your PR. I'm waiting for a kubernetes 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. |
/cc @mikedanese |
Is it possible to get an update on this pull request? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
@resouer @mikedanese @deads2k Is there any possibility at getting this PR looked at? While it seems minor, I did spend the time to find the issue and a fix for it. It would be great to receive some feedback (it may not be the right way to fix this) and/or have it merged into the actual code base (if it's a reasonable fix), especially since it's been open for over 8 months now. |
Hi @zachomedia, thanks for the fix. Can you please add a test to demonstrate the issue and so that we don't regress when we fix it? |
/hold #88192 is touching the same place but handles the leader release differently. @smarterclayton which should we proceed with? |
@liggitt the two changes are functionally equivalent, so it's just a matter of what information we want to convey to the user until the next leader picks up. I like that this has a test. |
Hey folks! Would be nice to have it in soon since it's has been around for some time now and it seems that it's just lacks the final ok to go. @liggitt @mikedanese is there anything blocking this? |
/test all +1 for the test |
/retest |
@liggitt I'm not sure what to do about the tests, it seems to be a different one that fails every time. I think a run of that test passed based on https://prow.k8s.io/pr-history/?org=kubernetes&repo=kubernetes&pr=80954 though? |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
Is this PR eligible to cherry pick back through v1.18.x? |
yes |
Done! |
…54-upstream-release-1.18 Automated cherry pick of #80954: Generate complete leader election record to resolve
…80954-upstream-release-1.17 Automated cherry pick of #80954: Generate complete leader election record to resolve
…54-upstream-release-1.19 Automated cherry pick of #80954: Generate complete leader election record to resolve
What type of PR is this?
/kind bug
What this PR does / why we need it:
Resolves lock release issues with leader election when using LeaseLocks when
ReleaseOnCancel
is set totrue
(like in the example https://github.com/kubernetes/client-go/blob/master/examples/leader-election/main.go):This PR updates the
LeaderElectionRecord
generated in the release function to:LeaseDurationSeconds
to 1 so that it's valid withLeaseLocks
RenewTime
andAcquireTime
since it panics without that informationSpecial notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: