Skip to content

fix(kubernetes): skip pause dispatch for an already Paused BatchSandbox - #2082

Merged
Spground merged 1 commit into
opensandbox-group:mainfrom
drakeo338:claude/2080-fix
Sep 30, 2026
Merged

Spground merged 1 commit into
opensandbox-group:mainfrom
drakeo338:claude/2080-fix

Conversation

@drakeo338

Copy link
Copy Markdown

Fixes #2080.

Summary

Renewing a Paused BatchSandbox bumps its generation. dispatchPauseResume then treated spec.pause=true as a new pause request and ran handlePause, which needs a running source pod. There is none, so the sandbox went to Failed with PauseFailed/PodNotFound. The dispatcher now skips the pause when the phase is already Paused.

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Only the new controller unit test was run, and it fails on the base and passes with the fix. Nothing else was run.

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

A generation bump on a Paused BatchSandbox with spec.pause=true (for
example a renew-only spec change) was treated as a new pause request:
handlePause ran again and moved the phase back to Pausing, creating a
new snapshot. Return unhandled when the phase is already Paused.

Fixes opensandbox-group#2080
@github-actions github-actions Bot added component/k8s For kubernetes runtime size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 30, 2026

@Pangjiping Pangjiping left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Spground Spground left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Spground
Spground merged commit d129d78 into opensandbox-group:main Sep 30, 2026
66 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/k8s For kubernetes runtime size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Renewing a paused BatchSandbox recreates the pod from the original image and fails the sandbox

5 participants