Skip to content

fix: retry hibernate cleanup before deleting a CocoonSet - #64

Merged
CMGS merged 2 commits into
mainfrom
codex/fix-hibernate-teardown-retry
Oct 5, 2026
Merged

CMGS merged 2 commits into
mainfrom
codex/fix-hibernate-teardown-retry

Conversation

@CMGS

@CMGS CMGS commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Deleting a suspended CocoonSet during a registry probe or DELETE failure previously removed its finalizer anyway. The surviving :hibernate tag could then restore the previous guest state into a new same-named Set, because VM names are stable across Set UIDs. The old Set's cleanup record was already gone, so normal retries and local snapshot GC could not finish the deletion.

Return the hibernate cleanup error and keep the existing finalizer and VM-name record until a later reconcile succeeds. This completes the teardown intent from #5 and #61 using the existing queue and idempotent tag lookup. :latest retention and its best-effort cleanup remain unchanged. Successful reconciliation adds no registry calls, scans, locks, or persisted fields; the production Go diff has zero net lines.

Validation:

  • New regression failed on the original code for both probe and DELETE errors, then passed with the fix: cleanup debt survives, and the next reconcile removes the tag and finalizer. A separate case preserves best-effort :latest cleanup.
  • GOWORK=off make test: Linux/Darwin vet and the complete native Darwin race/coverage suite passed.
  • GOWORK=off make lint: pinned golangci-lint v2.13.2, Linux and Darwin, zero issues.
  • GOWORK=off make fmt-check and ASL on Linux/Darwin passed.
  • Independent source review and a separate targeted race run found no remaining blocker in this path. No live cluster, registry, or VM test was run.

CMGS added 2 commits October 5, 2026 01:36
The successor half could not fail at base: a fresh CocoonSet has no restore intent, so the operator never probes the tag.
@CMGS
CMGS marked this pull request as ready for review October 5, 2026 07:30
@CMGS
CMGS merged commit 0a36850 into main Oct 5, 2026
2 checks passed
@CMGS
CMGS deleted the codex/fix-hibernate-teardown-retry branch October 5, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant