stolon
stolon copied to clipboard
Add overwriteDB flag. This allows user to safely call init cluster
cluster without fear of overwriting an existing DB. Usage: init -o=false Default is true, to preserve original behavior.
@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 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
@sgotti taken care of PR comments. my usecase is exactly same as @dineshba .
@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.
@sgotti Could you please review?
@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?