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

CLOUD-46: Fix 'exit 1' on replset-init of restarted CR w/existing PVC data #226

Merged
merged 2 commits into from
Jan 4, 2019

Conversation

timvaillancourt
Copy link
Contributor

@timvaillancourt timvaillancourt commented Jan 4, 2019

This fixes a problem where the operator fails to initiate a replset that was already initiated before CR creation time. We should skip and exit 0, but instead we exit 1 with a "not master" error.

The fix ensures the replset config is loaded from the session before .IsInitiated() is called to check if the replset was already initiated here:

if rsCnfMan.IsInitiated() {
return ErrReplsetInitiated
}

Without this PR this ^^^ block is getting skipped.

@timvaillancourt timvaillancourt changed the title CLOUD-46: Fix exit 1 on restarted CR with existing PVC data CLOUD-46: Fix 'exit 1' on replset-init of restarted CR w/existing PVC data Jan 4, 2019
@codecov
Copy link

codecov bot commented Jan 4, 2019

Codecov Report

Merging #226 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
- Coverage   62.99%   62.98%   -0.01%     
==========================================
  Files          38       38              
  Lines        1916     1921       +5     
==========================================
+ Hits         1207     1210       +3     
- Misses        616      618       +2     
  Partials       93       93
Impacted Files Coverage Δ
controller/replset/initiator.go 11.25% <0%> (+1.57%) ⬆️

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 230f4b8...c135b85. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants