Skip to content
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

Issue 579: Fixing leader election failure after node reboot #581

Merged
merged 5 commits into from
Oct 6, 2021

Conversation

anishakj
Copy link
Contributor

@anishakj anishakj commented Oct 4, 2021

Change log description

In VMware cluster, some pods are stuck in ProviderFailed state, and leader election function, provided by operator SDK, is unable to process that, so new pods are stuck in wait cycle.

Purpose of the change

Fixes #579

What the code does

Customise the leader.Become() function of operator-sdk and if the pod is in ProviderFailed state, delete the pod and configmap so that new pod can come up.

How to verify it

Verify in Vmware setup pods are coming up successfully after node reboot.

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2021

Codecov Report

Merging #581 (ae62140) into master (b84af47) will decrease coverage by 0.50%.
The diff coverage is 41.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #581      +/-   ##
==========================================
- Coverage   74.68%   74.17%   -0.51%     
==========================================
  Files          15       16       +1     
  Lines        4164     4229      +65     
==========================================
+ Hits         3110     3137      +27     
- Misses        932      962      +30     
- Partials      122      130       +8     
Impacted Files Coverage Δ
pkg/util/leader.go 41.53% <41.53%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b84af47...ae62140. Read the comment docs.

@anishakj anishakj requested review from jkhalack and SrishT October 4, 2021 08:32
@anishakj anishakj marked this pull request as ready for review October 4, 2021 08:32
Copy link

@jkhalack jkhalack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@SrishT SrishT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: anishakj <[email protected]>
@anishakj anishakj merged commit ee566f2 into master Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leader election fails after node reboot
5 participants