Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

leaderelection do not stop leading properly #2075

Copy link
Copy link
Open
@ealyn

Description

@ealyn
Issue body actions

What happened (please include outputs or screenshots):
After onstarted_leading function throw exception and finish, the process still leading.

What you expected to happen:
The process stop leading immediatly.

How to reproduce it (as minimally and precisely as possible):
Just follow the leaderelection/example.py.

Anything else we need to know?:
Go client use ctx.Done() to find out the OnStartedLeading finish, and then release lock:
https://github.com/kubernetes/client-go/blob/1309f64d6648411b4a36a2f7fa84dd8df31884b6/tools/leaderelection/leaderelection.go#L265-L291

Environment:

  • Kubernetes version (kubectl version): v1.20.15
  • OS (e.g., MacOS 10.13.6): 10.15.7
  • Python version (python --version): 3.8.10
  • Python client version (pip list | grep kubernetes): 21.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.