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 174: Fixing the leader election failure after node reboot #175

Merged
merged 9 commits into from
Oct 6, 2021

Conversation

anishakj
Copy link
Contributor

@anishakj anishakj commented Oct 4, 2021

Signed-off-by: anishakj [email protected]

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 #174

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 #175 (a092368) into master (3a2a5c0) will decrease coverage by 1.42%.
The diff coverage is 41.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
- Coverage   81.64%   80.21%   -1.43%     
==========================================
  Files           9       10       +1     
  Lines        1760     1825      +65     
==========================================
+ Hits         1437     1464      +27     
- Misses        251      281      +30     
- Partials       72       80       +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 3a2a5c0...a092368. Read the comment docs.

@anishakj anishakj requested review from SrishT and jkhalack 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 b3300a4 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 after node reboot fails
5 participants