Skip to content

bug: SandboxUpdateOps stuck in Updating when failed count reaches maxUnavailable #425

Description

@zyl1121

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions