restart master first in some edge cases #1655
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.
The current master branch of operator will always restart replicas first when attempting a restart if Patroni config differs from manifest. But in case the following parameters have lower values:
master needs to be restarted first. Problem is
SetConfig
is only called once and there might be a mix of variables that require different restart strategies. One idea could be to first check if there's a pending restart on the master and restart it, if the mentioned variables have lower values.Or we accept a mismatch between Patroni config and actual config since a restart is only triggered by the operator if manifest differs from the result of /config endpoint.
The Postgres version in the manifest will be raised back to 14 when the e2e test image is on 14 as well.