Prevent additional restart after upgrade #99
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a cluster runs with k-safety of 1, we use the UpdateStrategy of RollingUpdate in the StatefulSet. This should apply to everything but changes to the image because we have our own method of changing the image. Otherwise, what can happen is that after the image change is successful (i.e. the cluster is brought online), the StatefulSet controller will go through the RollingUpdate process: it will kill the last pod in the state, wait for it become ready (i.e. Vertica running), then kill the next pod and repeat. This ends up causing another restart to occur after the upgrade.
The change in this PR is to change the UpdateStategy to OnDelete when changing the image. The UpdateStrategy will go changed back to RollingUpdate, but sometime after the image change.
There are a lot of changes in this PR. I bulk of those changes was renaming the e2e test upgrade-vertica to upgrade-vertica-ks-0. A new e2e test upgrade-vertica-ks-1 was added to test upgrade for k-safety 1 clusters.