Background
When upgrading Claimed Sandboxes via SandboxUpdateOps, if the number of failed sandboxes reaches maxUnavailable while candidates remain, the SUO gets permanently stuck in Updating phase. This blocks creation of any recovery SUO in the same namespace due to the single-active-ops webhook guard, and operators typically don't have delete permissions on SUO resources.
Issue Type
bug
Relevant Code
pkg/controller/sandboxupdateops/sandboxupdateops_controller.go — the concurrency formula toUpgrade = maxUnavailable - updating - failed returns 0 when failed >= maxUnavailable, but the terminal state condition updated+failed == total is never met because candidates still exist. The SUO stays in Updating indefinitely.
Notes
- Reproduce: create a SUO with
maxUnavailable: 1 selecting 2+ sandboxes, let the first sandbox fail (e.g. bad preUpgrade hook). The SUO will block all remaining sandboxes in Updating indefinitely.
- The webhook at
pkg/webhook/sandboxupdateops/validating/sandboxupdateops_validate.go rejects new SUO creation when a non-terminal SUO exists in the namespace.
Background
When upgrading Claimed Sandboxes via SandboxUpdateOps, if the number of failed sandboxes reaches
maxUnavailablewhile candidates remain, the SUO gets permanently stuck inUpdatingphase. This blocks creation of any recovery SUO in the same namespace due to the single-active-ops webhook guard, and operators typically don't have delete permissions on SUO resources.Issue Type
bug
Relevant Code
pkg/controller/sandboxupdateops/sandboxupdateops_controller.go— the concurrency formulatoUpgrade = maxUnavailable - updating - failedreturns 0 whenfailed >= maxUnavailable, but the terminal state conditionupdated+failed == totalis never met because candidates still exist. The SUO stays inUpdatingindefinitely.Notes
maxUnavailable: 1selecting 2+ sandboxes, let the first sandbox fail (e.g. bad preUpgrade hook). The SUO will block all remaining sandboxes inUpdatingindefinitely.pkg/webhook/sandboxupdateops/validating/sandboxupdateops_validate.gorejects new SUO creation when a non-terminal SUO exists in the namespace.