mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-14 22:03:17 +00:00
restore failure cleanup leaks runtime and volume state #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
RestoreSnapshothas a post-boot failure window where the restored VM and its new system volume can outlive the control-plane write that was supposed to make them durable.What happens today:
internal/daemon/snapshot.go:233-284).store.CreateVolumeorstore.CreateMachinefails, the function returns immediately without stopping the restored VM, removing the copied disk, or rolling back the just-created volume record (internal/daemon/snapshot.go:257-267,internal/daemon/snapshot.go:282-283).reconcileRestoreonly removes the machine disk directory and runtime directory when the machine record is missing; it does not delete any leaked volume record or explicitly stop a partially restored VM (internal/daemon/lifecycle.go:358-367).Impact:
RestoreSnapshotreturned an error.Expected behavior:
Suggested follow-up:
CreateVolumeandCreateMachinefailures.CreateVolumeand afterCreateMachineto verify full rollback.