Skip to content

leaderelection do not stop leading properly #2075

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

Open
ealyn opened this issue Jun 12, 2023 · 3 comments · May be fixed by #2379
Open

leaderelection do not stop leading properly #2075

ealyn opened this issue Jun 12, 2023 · 3 comments · May be fixed by #2379
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@ealyn
Copy link

ealyn commented Jun 12, 2023

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
@ealyn ealyn added the kind/bug Categorizes issue or PR as related to a bug. label Jun 12, 2023
@Manikkame123
Copy link

Hi Guys, I am new to this repo. Do you think this issue is good for beginner ?

@roycaihw
Copy link
Member

/help

@Manikkame123 Would be great if you could reproduce this issue

@k8s-ci-robot
Copy link
Contributor

@roycaihw:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

@Manikkame123 Would be great if you could reproduce this issue

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.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jul 31, 2023
@RaghavRoy145 RaghavRoy145 linked a pull request Mar 30, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants