Repository navigation
fix(fc): use "dead" status, not "stopped", for a reboot-killed microVM - #955
Merged
Merged
Conversation
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.
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #955 +/- ##
==========================================
+ Coverage 24.12% 24.21% +0.09%
==========================================
Files 44 44
Lines 4440 4440
==========================================
+ Hits 1071 1075 +4
+ Misses 3235 3231 -4
Partials 134 134 β View full report in Codecov by Harness. π New features to boost your workflow:
|
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
Follow-up to #954. After that PR merged, a live report from
onctl -p fc lsonfc-hel1-01(rebooted for a kernel upgrade) showed the orphaned microVM as paused β still wrong, just a different wrong status than before.Root cause: #954's reconciliation persists a dead fc microVM's status as
"stopped". Butcmd/list.go'sisPausedStatus()already treats the literal string"stopped"as the cross-provider paused/resumable convention:That's correct for AWS/GCP/Azure β a "stopped" EC2 instance or "deallocated" Azure VM still exists and can be resumed. It's not correct for fc: a microVM whose firecracker process died (e.g. host reboot) has no restart-from-disk β recovering it means destroy + recreate. Reusing
"stopped"collided with that check and folded the dead microVM intoonctl ls's PAUSED section, implying resumability it doesn't have β the exact kind of lie this whole fix exists to stop.Changes
fcStatusStoppedβfcStatusDead("dead") throughoutpkg/cloud/fc.goand thefc-specific duplicate-name check incmd/create.go.TestIsPausedStatusincmd/list_test.gocovering the AWS/GCP/Azure paused strings (true) alongside fc's"dead"(false), to lock in the distinction and catch any future status-string collision here.Test plan
go build ./...go vet ./...golangci-lint run ./cmd/... ./pkg/cloud/...β 0 issuesgo test ./pkg/cloud/... -run TestProviderFCβ all passing (renamed assertions)go test ./cmd/... -run "TestIsPausedStatus|TestListCmd"β all passing, including the new regression test