Fix active_server
for multi-cluster deployments
#205
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.
Description
When addressing multiple clusters at once within a play, the
active_server
would only be determined once - when processing the very first cluster.active_server
would then be used to delegate the task to, to wait for all nodes and pods to be ready again.When all clusters are sized equally, this wouldn't cause any real troubles (yet still be incorrect in terms of actually verifying the state of the cluster's nodes), since the number of nodes in the first cluster would match the number of nodes in any other cluster checked for the nodes to be up.
But as soon as a cluster with a different number of nodes is present, this would cause failures/timeouts, since the check waiting for all nodes to be up and running again would never reach the expected number.
By not utilizing
run_once
and verifying for the include offirst_server.yml
, whetheractive_server
is a member of the current cluster, this problem can be prevented.Type of change
How Has This Been Tested?
rke2
successfully with those changesrke2
role fail without those changes