Merge pull request #17022 from sp98/fix-context-cancellation

osd: fix updateExistingOSDs function for cancelled context
This commit is contained in:
Blaine Gardner
2026-02-05 08:50:06 -07:00
committed by GitHub
+4
View File
@@ -237,6 +237,10 @@ func WaitForDeploymentsToUpdate(
waitFunc := func() (done bool, err error) {
deployments, err := listFunc()
if err != nil {
// if the context got cancelled, then no need to wait or retry.
if errors.Is(err, context.Canceled) {
return true, errors.Wrap(err, "failed to list deployments due to context cancellation")
}
return false, errors.Wrap(err, "failed to list deployments")
}
if len(deployments.Items) < len(waitingOn) {