mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-14 22:03:17 +00:00
snapshots silently drop attached user volumes #1
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?
CreateMachinesupports attached user volumes and passes them into the runtime as extra drives, but the snapshot/restore path only persists and restores the system disk.What happens today:
buildMachineSpecincludes attached user volumes as additionalDriveSpecs (internal/daemon/create.go:169-187).CreateSnapshotonly COW-copies the system disk and appends a singlesystem.imgentry toSnapshotRecord.DiskPaths(internal/daemon/snapshot.go:86-100).RestoreSnapshottreatssnap.DiskPaths[0]as the new system disk, hard-codesloadSpec.DiskPathsto an empty map, and creates the restoredMachineRecordwithout anyUserVolumeIDs(internal/daemon/snapshot.go:214-230,internal/daemon/snapshot.go:269-284).Impact:
Expected behavior:
UserVolumeIDs, or reject snapshot requests for machines that have attached user volumes until that support exists.Suggested follow-up:
SnapshotRecordto persist system vs user disk metadata.SnapshotLoadSpec.DiskPathsduring restore.UserVolumeIDson the new machine record.UserVolumeIDs.