fix: don't wait on sibling profiles when the cluster is being deleted - #1978
Merged
Merged
Conversation
allMatchingProfilesProcessed serializes Helm chart hand-off between sibling ClusterProfile/Profiles targeting the same cluster. Before a ClusterSummary uninstalls a chart it no longer references, it waits for every other matching profile to finish registering. In case one of them is about to take over management of that same release there will be an upgrade instead of uninstall-then-reinstall. That wait assumed there was always something to eventually finish. When the underlying cluster itself is being deleted, every ClusterSummary targeting it starts undeploying at roughly the same time. There is no other profile that could "take over" a cluster that's going away. This caused a ClusterSummary delete process to wait till cluster is gone without removing the helm chart. This surfaced with SveltosCluster.Spec.CleanupGracePeriod, which keeps a deleting cluster present for a while instead of vanishing instantly, long enough for two sibling ClusterSummarys undeploying in parallel to actually hit this wait. It was always a latent bug; instant cluster deletion just never exposed it before. This PR also advances calico version used in fv to v3.32.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
allMatchingProfilesProcessed serializes Helm chart hand-off between sibling ClusterProfile/Profiles targeting the same cluster. Before a ClusterSummary uninstalls a chart it no longer references, it waits for every other matching profile to finish registering. In case one of them is about to take over management of that same release there will be an upgrade instead of uninstall-then-reinstall.
That wait assumed there was always something to eventually finish. When the underlying cluster itself is being deleted, every ClusterSummary targeting it starts undeploying at roughly the same time. There is no other profile that could "take over" a cluster that's going away. This caused a ClusterSummary delete process to wait till cluster is gone without removing the helm chart.
This surfaced with SveltosCluster.Spec.CleanupGracePeriod, which keeps a deleting cluster present for a while instead of vanishing instantly, long enough for two sibling ClusterSummarys undeploying in parallel to actually hit this wait. It was always a latent bug; instant cluster deletion just never exposed it before.
This PR also advances calico version used in fv to v3.32.0