Repository navigation
fix(fc): reconcile stale running/paused status against actual process liveness - #954
Merged
Merged
Conversation
… liveness onctl -p fc ls kept reporting microVMs as "running" indefinitely after their firecracker process died out-of-band — most notably a host reboot, which every firecracker VMM dies to but leaves metadata.json's last-written status untouched. Deploy() had the same blind spot: it treated a stale "running" record as proof the microVM was already up and silently no-op'd instead of recreating it. List/Deploy/GetByName now reconcile the persisted status against Process.IsRunning + Process.Owns (the same liveness check Destroy already used to guard against PID reuse), self-healing a stale record to a new "stopped" status on disk. Deploy() redeploys over a stopped record instead of returning it unchanged, and SSHInto now fails fast with a clear message instead of hanging against a dead socket.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 527d04a34e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
onctl create checks provider.List() for a same-named VM before calling Deploy, but List() includes fc records reconciled to "stopped" (dead process, e.g. after a host reboot). That made the check abort with "VM exists" instead of ever reaching Deploy's stale-record recreate path, defeating the reconciliation added in the previous commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuNxaYWJi7HTNLUAZjPC1y
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #954 +/- ##
==========================================
+ Coverage 23.94% 24.12% +0.17%
==========================================
Files 44 44
Lines 4418 4440 +22
==========================================
+ Hits 1058 1071 +13
- Misses 3229 3235 +6
- Partials 131 134 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5 tasks done
cdalar
added a commit
that referenced
this pull request
Jul 8, 2026
#955) PR #954's reconciliation persisted a dead fc microVM's status as "stopped" — but cmd/list.go's isPausedStatus() already treats the literal string "stopped" as the cross-provider paused/resumable convention (AWS "stopped", GCP "TERMINATED", Azure "deallocated") and folds it into onctl ls's PAUSED section. That collision made a reboot-killed microVM (no restart-from-disk, must be destroyed and recreated) render as merely "paused" (implying it can be resumed), which is exactly what this fix was supposed to stop lying about. Renames fcStatusStopped to fcStatusDead ("dead") throughout pkg/cloud and the cmd/create.go duplicate-name check, and adds TestIsPausedStatus in cmd/list_test.go to lock in the distinction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Test plan