stolon icon indicating copy to clipboard operation
stolon copied to clipboard

Add overwriteDB flag. This allows user to safely call init cluster

Open codervinod opened this issue 6 years ago • 6 comments

cluster without fear of overwriting an existing DB. Usage: init -o=false Default is true, to preserve original behavior.

codervinod avatar Feb 07 '19 02:02 codervinod

@codervinod can you provide the rationale of this PR. This is already blocked by the manual confirmation. Are you trying to just avoid the manual confirmation? If so I'd prefer a --skip-existing option name.

sgotti avatar Feb 15 '19 12:02 sgotti

@sgotti We also need this feature. Reason: We are running stolon in k8s with consul backend. And we are using helm chart to deploy things. So we are using init --yes which will init the cluster. There are chances where by mistake we may give the same cluster name for more than one stolon cluster which will delete the data in store as we gave init --yes.

So we want to avoid this by giving init --yes --skip-existing which will skip the init.

@codervinod Thanks for the PR and I would suggest the name skip-if-present

dineshba avatar Feb 21 '19 11:02 dineshba

@sgotti taken care of PR comments. my usecase is exactly same as @dineshba .

codervinod avatar Mar 10 '19 00:03 codervinod

@codervinod One small suggestion. If you could squash and make it as one time commit it will be better. Once @sgotti reviewed and if looks good, it will be easy for him to merge it immediately.

dineshba avatar Mar 12 '19 17:03 dineshba

@sgotti Could you please review?

codervinod avatar May 07 '19 20:05 codervinod

@codervinod I noticed that you pushed a new commit. Can you please squash in a single commit and fix the formatting error that make the ci run fail?

sgotti avatar Mar 12 '20 22:03 sgotti