Skip to content

leadere lection: release lock when error occour and graceful shotdown #1669

Closed as not planned

Description

@fangfenghuang

What happened (please include outputs or screenshots):
causes error during shutdown.

INFO:root:leader abd7df1c-1077-48e8-a91c-4dd0243c89b9 has successfully acquired lease
INFO:root:abd7df1c-1077-48e8-a91c-4dd0243c89b9 successfully acquired lease
I am leader now!!!!
INFO:root:Leader has entered renew loop and will try to update lease continuously
INFO:root:leader abd7df1c-1077-48e8-a91c-4dd0243c89b9 has successfully acquired lease
INFO:root:leader abd7df1c-1077-48e8-a91c-4dd0243c89b9 has successfully acquired lease
INFO:root:leader abd7df1c-1077-48e8-a91c-4dd0243c89b9 has successfully acquired lease
INFO:root:leader abd7df1c-1077-48e8-a91c-4dd0243c89b9 has successfully acquired lease
^CTraceback (most recent call last):
File "leader_main.py", line 38, in
leaderelection.LeaderElection(config).run()
File "/usr/local/python3/lib/python3.8/site-packages/kubernetes/leaderelection/leaderelection.py", line 64, in run
self.renew_loop()
File "/usr/local/python3/lib/python3.8/site-packages/kubernetes/leaderelection/leaderelection.py", line 101, in renew_loop
time.sleep(retry_period)
KeyboardInterrupt

What you expected to happen:
release lock when error occour and graceful shotdown

How to reproduce it (as minimally and precisely as possible):
example task

Activity

  1. added
    kind/bug
    on Jan 6, 2022
  2. roycaihw commented on Jan 31, 2022

    @roycaihw
    Member
  3. k8s-triage-robot commented on May 1, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle stale
    • Mark this issue or PR as rotten with /lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  4. added
    lifecycle/stale
    on May 1, 2022
  5. k8s-triage-robot commented on May 31, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle rotten

  6. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on May 31, 2022
  7. roycaihw commented on Jun 14, 2022

    @roycaihw
    Member

    /remove-lifecycle rotten

  8. removed
    lifecycle/rotten
    on Jun 14, 2022
  9. k8s-triage-robot commented on Sep 12, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle stale
    • Mark this issue or PR as rotten with /lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  10. added
    lifecycle/stale
    on Sep 12, 2022
  11. k8s-triage-robot commented on Oct 12, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle rotten

  12. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Oct 12, 2022
  13. k8s-triage-robot commented on Nov 11, 2022

    @k8s-triage-robot

    The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

    This bot triages issues according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Reopen this issue with /reopen
    • Mark this issue as fresh with /remove-lifecycle rotten
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /close not-planned

  14. k8s-ci-robot commented on Nov 11, 2022

    @k8s-ci-robot
    Contributor

    @k8s-triage-robot: Closing this issue, marking it as "Not Planned".

    Details

    In response to this:

    The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

    This bot triages issues according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Reopen this issue with /reopen
    • Mark this issue as fresh with /remove-lifecycle rotten
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /close not-planned

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/buglifecycle/rotten

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions