Skip to content

Delete forks that a restart interrupted - #555

Open
yummybomb wants to merge 26 commits into
mainfrom
hypeship/recover-interrupted-forks
Open

yummybomb wants to merge 26 commits into
mainfrom
hypeship/recover-interrupted-forks

Conversation

@yummybomb

@yummybomb yummybomb commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A fork that was still being brought up when Hypeman was killed stayed behind as an ordinary instance, holding its VMM, its memory and its vGPU. A fork is now marked pending until its request succeeds, and at startup Hypeman deletes the marked forks whose API process is gone.

A fork from a running instance is also deleted, even if it is already running, when its request fails because the source did not come back. It used to stay up under the requested name.

Why it happened

A fork is made in two steps: its metadata is saved, then it is brought to the state the caller asked for. If the process dies in between, the fork stays wherever it got to. Nothing on disk says it is unfinished, so after the restart it looks like any other standby or paused instance. The caller was disconnected without a response and has no ID to delete.

For a QEMU guest with a vGPU this is expensive: a restore that was cut short keeps its VMM, the guest memory it had pinned and its virtual function until someone deletes the instance by hand.

What changes

  • StoredMetadata.ForkPending is set when a fork's metadata is first saved, for instance forks and snapshot forks, and cleared once the fork has reached its target state. It names the API process that is making the fork, by PID, start time and boot ID. If clearing it fails, the fork request fails and the fork is cleaned up like any other failed fork, so a fork whose caller got a success is never still marked.
  • Clearing the mark syncs the metadata file and the instance directory before the request succeeds. The save was a write and a rename, neither synced, so a host crash soon after could bring the marked metadata back, and the new boot ID would then have recovery delete a fork whose caller got a success. If the sync fails, the fork request fails, and the fork is marked again first: the cleared metadata is already in place by then, and a fork whose delete fails as well must still be found at the next start.
  • RecoverInterruptedForks runs once at startup, before the API listens and before the vGPU reconciler starts. It deletes a marked fork only when the process named in the mark no longer exists: its PID is gone, belongs to a process started at another time, or was recorded before a reboot. When it cannot tell, it leaves the fork alone and logs a warning. It reads the mark again after the owner check and goes by that: another API process can clear the mark, answer its caller and exit between the first read and the check, and once it is gone the mark can no longer change.
  • Fork copies skip the source’s metadata.json. The shared metadata loader rejects records naming another guest, so an older partial copy cannot supply that guest’s control socket to the TTL reaper or an exact-ID lookup. The listing that vGPU claims and reconciles read skips such a directory instead of failing on it. That listing fails on any guest it cannot read, and a kill during a fork copy on an older binary leaves exactly this directory, so without the skip one of them would fail every vendor VFIO claim on the host. A directory holding another guest's metadata cannot have a VMM of its own, so there is nothing in it to account for.
  • Snapshot metadata never carries the mark, so nothing restored or forked from a snapshot of a pending fork inherits it. The copy of the instance's metadata file in the snapshot payload does not carry it either. A restore puts that file back as the instance's own until it saves the restored metadata, so a restore cut short there left a marked instance for the next start to delete. The payload copy skips that file and writes it without the mark, so a payload never holds the mark, even partway through a copy. Restoring a snapshot onto a fork that is still marked is refused with 409: the restored metadata would drop the mark.
  • A fork from a running instance is deleted when its source cannot be restored afterwards, or the restored source's guest agent does not come back. The request already failed in those cases, but the fork stayed up under the requested name until the next start deleted it. No guest state is lost with the fork: a source that fails to restore keeps its standby snapshot and can be restored later, and a source whose guest agent is slow is itself running. In that second case the fork is deleted although both guests are up. The caller has no ID for it, and the request has no way to hand one back with an error.
  • Recovery deletes up to 8 interrupted forks at once. The API does not listen until recovery returns, and nobody was given these guests, so recovery kills a running fork's VMM without first asking its guest to shut down. A fork holding a passthrough device is the exception: its guest gets up to 5 s to unload the driver. It also logs an instance whose metadata cannot be stat'd or parsed instead of skipping it silently, and ends with one line giving how many forks it deleted, failed to delete and left to a running owner, and how long it took.
  • A standby compression job no longer writes instance metadata without the instance lock when it ends. It cleared its plan by loading and saving the metadata unlocked, so for a fork brought to standby, a job ending as the fork completed could save a copy read before the mark was cleared, and the next start would delete a fork whose caller got a success. The job now takes the lock if it is free. If it is held, by a writer or a reader, the job leaves the plan in place. A holder that waits for the job clears the plan itself or deletes the instance. Any other holder, such as an instance lookup, clears nothing, so the plan can outlive its job. Nothing acts on a plan except startup recovery, which compresses the snapshot if it is still raw and clears the plan otherwise. The job cannot wait for the lock, because delete, restore and snapshot hold it while waiting for the job.
  • Startup no longer restarts standby compression for a fork that is still marked. It did that before recovery ran, so a fork cut short just after it reached standby had its snapshot compressed and then deleted.
  • A failure to clear the mark is reported as itself, not as "apply fork target state".
  • A marked fork whose owner is gone cannot be started or restored; the request gets 409. Such a fork is one that recovery tried and failed to delete. It stays under the name its caller asked for and looks like any other instance, and the next start deletes it, so a client that found it by name and brought it up would lose it then. A fork that its own failing request could not delete is in the same position with its owner still running, so that request rewrites the mark to name no process, which always counts as gone. Delete still works on both.
  • The API takes an exclusive lock (flock) on the data directory before it reads or writes anything in it, and exits if another process holds the lock. Instance locks exist only inside one process, so a second API process on the same directory could save over the first one's metadata. Older binaries do not take the lock, so the old process has to be stopped before this one starts (DEVELOPMENT.md). The configuration is now loaded once, so the directory that is locked is the one the rest of startup uses.
  • Startup puts back a source directory that Firecracker's snapshot alias fallback had renamed. When a fork's snapshot state cannot be rewritten for its new path, the restore renames the source to <id>.fork-bak.<time> and links the source path to the fork while the snapshot loads. A kill there left the source ID resolving to the fork. RecoverParkedForkSources runs under the lock, before instances are listed, and renames the backup back. It acts only when the link points at a Firecracker fork that records that source and has no running owner. For any other layout (two backups for one source, an ordinary directory at the source path, a link to something else) it leaves that source as it is, logs an error naming it and goes on to the others. The API still starts: the metadata loader never resolves a source's path to another guest, so a source left parked is missing and every other guest is unaffected. It stays that way until its directory is repaired.
  • If the source was already deleted there is no backup. Startup removes the symlink only when its target verifies as the Firecracker fork that records that source and has no live fork owner. The completed fork stays. Unverified links are left alone; a later aliased restore can still replace a dangling link.
  • Deleting an instance releases a passthrough device only when it is the recorded owner. Startup reconciliation keeps the owner on disk until the device is unbound or confirmed no longer bound. A failed release keeps a pending fork, with the device still attached to it, so the release can be retried. Any other delete goes ahead, and clears its own attachment when the release fails: nothing retries a release for an instance that is gone, and a device attached to a missing instance could not be given to another one until the next start.
  • An interrupted restore can leave a TAP before its IP and MAC have been saved. If no allocation can be derived, fork deletion confirms the hypervisor is gone and releases by instance ID. If the live TAP name is ambiguous or the release fails, the fork is still deleted and the TAP is left to the TAP reconciler, which deletes a TAP that no live instance claims once it is five minutes old.

Forks that completed are not touched, and a graceful restart still lets in-flight forks finish.

The owner check was added before the data directory lock. With the lock, a second API process of this version cannot start against the same directory: the binary has no flags, so running it to look for a version used to start a second server, and now exits at the lock. The check stays as a second guard, because recovery is in lib/instances and cannot tell whether its caller holds the lock.

Testing

  • For the follow-up fixes: eight regression tests passed locally in a non-root container with all capabilities dropped and no devices passed through. A separate Linux test with /dev/net/tun and NET_ADMIN in a private network namespace created real TAPs and verified that recovery removes a fork's TAP with the fork, and deletes the fork but leaves the TAP when another guest shares its short name. The VFIO tests used a fake binder, not a physical PCI device. The build, vet of the changed packages, targeted instance tests and the lib/devices, lib/network and lib/forkvm package tests also passed. The full hypervisor suite was not rerun for this follow-up.

  • TestForkIsPendingOnlyUntilItsRequestSucceeds covers the mark through an instance fork, a snapshot fork, a fork left half-made and a snapshot of that fork. TestRecoverInterruptedForksDeletesOnlyForksWhoseProcessIsGone runs the startup pass over a fork whose process exited (deleted), one whose process is still running (kept) and a finished one (kept). Two more tests cover the owner check: an exited process, a reused PID, an earlier boot, and a live PID with nothing else recorded.

  • TestRunningForkIsDeletedWhenItsSourceDoesNotComeBack fails the source restore after a fork and checks the fork is gone and the source is kept. A source whose guest agent does not come back returns through the same delete. TestRecoverInterruptedForksDeletesConcurrently holds three deletes open and checks all three are in flight together. Each fails when its change is reverted (no delete on a failed source restore; a concurrency limit of 1).

  • TestCompressionJobLeavesLockedInstanceMetadataAlone ends a compression job while the instance is locked and checks the job wrote nothing, then ends one unlocked and checks the plan is cleared and the mark kept. The recovery test now also covers an instance whose metadata fails stat and one whose metadata does not parse: both are kept and both are named in the log. TestRecoverPendingStandbyCompressionJobsSkipsPendingFork checks that startup starts no compression job for a marked fork. Each of these fails when its change is reverted.

  • TestRecoverInterruptedForksLeavesDirectoryHoldingAnotherInstancesMetadata copies a pending fork's directory the way an interrupted fork does, lets the source finish, and checks that recovery deletes nothing and detaches none of the source's devices. TestRecoverInterruptedForksKeepsForkFinishedSinceItsMarkWasRead clears the mark between recovery's read and its owner check and checks the fork is kept. TestForkFailsWhenClearingItsMarkCannotBeSynced fails the directory sync and checks the request fails and the fork is deleted, and that a fork left in place after the failed sync is still marked. TestForkIsPendingOnlyUntilItsRequestSucceeds now also reads the metadata file in the payload of a snapshot of a pending fork. Each fails when its change is reverted.

  • TestServerRefusesSecondWriterBeforeStartup starts the server in a subprocess against a locked data directory, reached through a symlink, and checks it exits at the lock without creating anything. TestRecoveryRestoresParkedFirecrackerSource covers a parked source with its link and one with only the backup, and four layouts that must be refused and left untouched: a link to another fork, a fork whose owner is running, an ordinary directory at the source path, and two backups. TestWithSnapshotSourceDirAlias_ReplacesDanglingAlias runs an aliased restore over a dangling link, and fails with "file exists" when the removal is reverted.

  • TestParkedSourceRecoveryGoesOnPastASourceItRefuses parks two sources behind one fork that records only one of them, and checks that one is put back, the other is left with its link and backup and resolves to no instance, and the error names only the refused one. TestReconcileListingSkipsDirectoryHoldingAnotherInstancesMetadata runs the vGPU listing over a copy of a source's directory, once with the source present and once with it deleted. TestAbandonedForkCannotBeStartedOrRestored checks that a finished fork and one whose owner is running pass, and that start and restore are refused for an exited owner and for the mark that names no process. TestForkItsRequestCannotDeleteIsAbandoned fails a fork's delete on a busy device and checks the mark is rewritten, the fork is refused, and the next recovery deletes it. Each fails when its change is reverted. These four ran locally without VMs; the tests in lib/instances that boot guests could not run there and were left to CI.

  • TestRecoveryLeavesInheritedPCIDeviceWithOwner deletes an interrupted fork whose device list names a device attached to its source and checks the device record is unchanged. TestReleaseInstanceDeviceKeepsOwnerUntilUnbound checks that an unbind failure retains the owner and that a retry can finish. TestDeleteFreesPCIDeviceWhenReleaseFails deletes an ordinary instance whose release fails and checks the device is left unattached, and TestDetachInstanceDeviceFreesOnlyItsOwnersDevice checks that only the owner's attachment is cleared. TestRecoveryDeletesForkWhenTAPReleaseFails fails the TAP release and checks the fork is deleted. TestRecoverInterruptedForksShutsDownOnlyGuestsWithPassthroughDevices recovers a running fork with and without a device and checks only the first is asked to shut down. Each fails when its change is reverted. TestRestoreSnapshotCannotReplacePendingFork and TestSnapshotPayloadNeverCopiesPendingMark cover the two snapshot guards.

  • The fork and snapshot tests in lib/instances (102, among them the fork, warm fork chain and snapshot tests that boot cloud-hypervisor, Firecracker and QEMU guests) pass on a KVM host with the sync in place.

  • A script doing the same write, sync, rename and directory sync as the durable save, on a host's XFS data disk, took 0.32 ms at the median against 0.07 ms unsynced, and 2.6 ms against 1.2 ms with 25 writers at once (p99 6.0 ms against 3.5 ms).

  • Nine mutants each fail at least one of them: the mark never cleared for either kind of fork, the mark kept in snapshots, the mark not naming the process, recovery ignoring the owner, recovery deleting nothing, and the owner check ignoring the PID, the start time or the boot ID.

  • On a host with two GPUs I killed Hypeman with SIGKILL while four vGPU snapshot forks were restoring, on a build of Add opt-in vGPU snapshots and forks on a managed QEMU runtime #552 plus this change:

Killed after Fork requests answered Deleted at startup Left after restart
0.3 s 0 of 4 4 nothing
0.7 s 0 of 4 4 nothing
1.0 s 0 of 4 4 nothing
1.5 s 0 of 4 4 nothing
2.2 s 1 of 4 3 the answered fork, running and usable

No VMM, virtual function, TAP or guest directory was left in any case, and the next fork passed. Without the change the same kill at 1.0 s left two forks Paused and two in Standby, with two VMMs still holding two virtual functions (two runs).

  • A graceful restart 1.0 s into four forks: all four requests succeeded, nothing was deleted at startup, and all four guests were running and usable.

Not covered

  • Two API processes on one data directory were not run on a host. The lock is covered by a test that starts the server in a subprocess.
  • The data directory lock, the parked-source recovery and the dangling-link removal are covered by unit tests only, not by a kill on a host.
  • Parked-source recovery leaves a layout it does not recognize as it is. The two layouts a kill inside the alias fallback leaves, the link with its backup and the backup alone, are both recovered. A guest directory changed by hand is refused and its source stays missing until it is repaired. The only sign is one error in the startup log: recovery runs before telemetry starts, so nothing counts it.
  • A directory holding another guest's metadata is not removed. It is still listed as an instance in state Unknown, and the API cannot delete it, as for any guest whose metadata cannot be read.
  • The refusal covers start and restore only. A fork left behind because its VMM could not be killed is still running and can still be used until the next start deletes it.
  • Without a backup, a dangling or unverified link is not removed at startup. An exact-ID lookup cannot return another guest through it.
  • The mark is only cleared on success, so a fork that a failed request leaves behind without cleaning it up is deleted at the next start too. The one such path found, a fork from a running instance whose source does not come back, now deletes the fork itself. That path is covered by a unit test with a failing restore, not on a host. No test makes the restored source's guest agent fail.
  • Parallel recovery was not timed on a host. A failure to clear the mark is covered for a failed directory sync only.
  • Recovery killing a running fork without a guest shutdown is covered by a unit test with a stand-in VMM process. The host kills in the table above were run before that change, when recovery still asked each guest to shut down first.
  • A TAP left to the TAP reconciler stays while the host has no running, paused or unknown instance: the reconciler skips a pass with nothing to preserve.
  • A failed sync followed by a failed delete is not a kept test. Run once as a scratch test, the fork stayed marked and the next recovery deleted it.
  • The metadata file in a snapshot payload is written without the mark and is not synced. A host crash can lose the file, but cannot leave a marked one.
  • No host crash was run. The sync is covered by a test that fails it, and its cost by a script, not by the fork path on a host.
  • A kill during the initial fork copy can still leave a directory with no metadata. It holds disk, not a VMM or vGPU. Recovery does not remove that directory.
  • A restore cut short between copying the snapshot payload and saving the restored metadata still leaves the instance with the metadata it had when the snapshot was taken. Only the mark is removed from that copy.
  • A VMM started in the instant before the kill, before its control socket exists and before its PID is saved, cannot be found by the delete. That window is the same as for any start and is not changed here.
  • A fork from a running instance puts its source in standby first. If Hypeman dies during that, the source stays in standby. This change only deals with the fork.
  • The mark-and-compression race above is covered by the locking rule, not by a test that interleaves a real job with a real fork.
  • A fork deleted by someone else between reaching its target state and having its mark cleared now fails the fork request with not found, where the request used to return a fork that no longer existed. An instance fork answers 404 "instance not found", which reads as the source missing, and a snapshot fork answers 500. A fork deleted while it was being brought to its target state already answered the same way. Nothing tests this.
  • Mixed versions: a binary without this change ignores the mark and drops it the first time it saves the fork's metadata. If this binary is killed mid-fork, an older one runs, and this one returns, it deletes the fork unless the older one wrote its metadata in between. A fork that was already running when the kill landed can be used in that time without a metadata write.
  • On macOS there is no start time or boot ID to compare, so the check has only the PID. A fork whose PID has been reused by another process is kept, as it is today.

Note

High Risk
Changes core startup ordering, single-writer data-dir locking, fork lifecycle recovery, VFIO passthrough release, and network teardown—areas where mistakes can leak GPUs, TAPs, or delete usable instances.

Overview
This PR prevents half-finished forks from surviving API crashes by marking new forks with fork_pending (owning API PID, start time, boot ID), durably clearing that mark only after the fork request succeeds, and running RecoverInterruptedForks at startup (before serving requests / vGPU reconcile) to delete marked forks whose owner is gone—up to 8 at a time, with passthrough devices getting a longer guest shutdown window.

Startup is hardened with an exclusive flock on the data directory (second API exits immediately), RecoverParkedForkSources for Firecracker snapshot alias backups, and refusal of start/restore on abandoned or in-flight forks. Failed running-fork flows delete the fork when the source cannot be restored; snapshot/instance copies omit metadata.json and never propagate the pending mark.

Passthrough and network cleanup is tightened: instance delete uses owner-aware ReleaseInstanceDevice / DetachInstanceDevice, VFIO unbind is verified in sysfs before clearing attachments, orphan reconcile keeps ownership until unbind is confirmed, and interrupted forks can release TAPs by instance ID when allocation metadata is missing. Related fixes include stricter vz-shim discovery on Darwin, metadata ID mismatch handling for partial copy directories, and compression jobs that avoid clobbering fork metadata without the instance lock.

Reviewed by Cursor Bugbot for commit cd62612. Bugbot is set up for automated code reviews on this repo. Configure here.

A fork's metadata is saved before the fork is brought to its target
state. If Hypeman was killed in between, the fork stayed behind as an
ordinary standby or paused instance: nothing marked it as unfinished, and
a restore that was cut short kept its VMM, its memory and its vGPU. The
caller had been disconnected without an answer and could not know the
instance existed.

A fork is now marked pending until its request succeeds, and pending
forks are deleted at startup before the vGPU reconciler runs.
The pending mark now names the API process that is making the fork, by
PID, start time and boot ID. The startup pass deletes a marked fork only
when that process no longer exists.

Without this, a second API process started against the same data
directory, by mistake or to check a binary, would have deleted the forks
that the running one was still bringing up.
… parallel

A running-source fork whose source did not come back failed its request
but stayed up under the requested name until the next restart deleted it.
Delete it when the request fails.

Recovery deleted interrupted forks one at a time before the API listened,
each waiting on guest shutdown. Delete up to 8 at once, and log instances
whose metadata cannot be read instead of skipping them silently.

Report a failure to clear the pending mark as itself rather than as a
target state failure.
A standby compression job cleared its plan by loading and saving the
instance metadata without the instance lock. For a fork brought to
standby, a job ending as the fork completed could save a copy read
before the pending mark was cleared, and the next start would delete a
fork whose caller got a success. The job now takes the lock if it is
free and otherwise leaves the plan to the holder or to recovery. It
cannot wait: a delete or restore holds the lock while waiting for it.

Recovery also logs instances whose metadata cannot be stat'd.
A source that could not be restored and one whose guest agent did not
come back each deleted the fork separately, and only the first was
tested. Both now return to one delete.

Recovery logs how many interrupted forks it deleted, failed to delete
and left to a running owner, and how long it took. Startup warns if the
instance manager cannot run it.

Cloning stored metadata copies the pending mark instead of sharing it.

The compression job comment said a plan left behind is cleared by the
lock holder. A reader blocks the clear too and clears nothing, so the
plan can stay until the next start.
@yummybomb
yummybomb marked this pull request as ready for review November 13, 2026 20:10
Startup restarted compression for every standby instance with a plan
before it deleted interrupted forks, so a fork cut short just after it
reached standby had its snapshot compressed and then deleted. A fork
that is still marked is now skipped.
A guest directory is copied with its metadata file. A snapshot of a fork
that was still pending kept the mark in its payload, and a fork or
restore cut short after the copy, before it saved its own metadata, left
that file in place. At the next start recovery then deleted by it: in a
fork's directory it stopped the guest the metadata names, and on a
restored instance it deleted the instance.

Recovery now skips a directory whose metadata names another instance,
and a snapshot payload's copy of the metadata no longer carries the
mark.
The mark was cleared with a write and a rename, neither synced. A host
crash soon after could bring the earlier, marked metadata back, and the
new boot ID then had recovery delete a fork whose caller got a success.
Clearing the mark now syncs the file and the instance directory, and
the fork request fails if it cannot.
Recovery read the mark, then checked the owner, then deleted. With
another API process on the same data directory, that process could
clear the mark, answer its caller and exit between the read and the
check, and recovery deleted the finished fork. It now reads the mark
again after the owner is gone, when it can no longer change.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread lib/instances/snapshot.go Resolved
The cleared metadata is renamed into place before its directory is
synced. When that sync failed the request failed with the mark already
gone, so a fork whose delete then failed as well stayed behind
unmarked and no later start removed it. The mark is now saved again
before the request fails.
A restore killed while its source directory did not exist leaves a bare link with no backup, so startup recovery does not see it. Once startup deletes the fork it pointed at, the link dangles, and every later aliased restore for that source failed with "file exists".

Also say what is wrong when startup finds an ordinary directory beside a parked source, instead of a bare readlink error.
A restore killed while it had renamed its source aside leaves a backup and a link to the fork. If an older binary runs next and the fork is deleted, the link dangles, and startup refused to run on that layout. The backup is still the source, so remove the link and put it back.
The durable save held the alias reader lock across both syncs. A restore waiting to alias a source directory takes that lock for writing, and while it waits no metadata on the host can be read. The file and directory are now opened under the lock and synced without it.
A fork request that fails because its caller went away runs its cleanup with a cancelled context. A delete that stops on it leaves the fork up and marked until the next start.
Recovery only logged what it did. A fork it could not delete, or left to an owner that looks alive, still holds its VMM and vGPU, and nothing reported that across hosts.
A TAP that could not be released, or whose short name another guest
shares, kept the pending fork: its VMM was gone but it stayed listed under
the requested name until the next start. The TAP reconciler already
deletes a TAP that no live instance claims, so the fork is deleted and the
TAP is left to it.
A delete that failed to unbind a device kept the instance as the device's
owner and then removed the instance. Nothing retries the release once the
owner is gone, and a device attached to a missing instance cannot be given
to another one until the next start. Only a pending fork is kept for a
retry, so any other delete now clears its own attachment.
Recovery waited up to 2 s for each running fork's guest to shut down
while the API was not yet listening. Nobody was given these guests, so
only one holding a passthrough device, whose driver has to unload, is
shut down first.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2063699. Configure here.

Comment thread cmd/api/main.go
// A source that cannot be put back is left as it is and never resolves
// to another guest, so the rest of the host starts without it.
if err := instances.RecoverParkedForkSources(paths.New(cfg.DataDir)); err != nil {
slog.Error("failed to recover parked fork sources; they are left as they are until repaired", "error", err)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parked backups listed as unknown guests

Medium Severity

Startup now continues when RecoverParkedForkSources cannot put a source back, so *.fork-bak.* directories stay on disk while the API serves. walkMetadataFiles treats those backups as guests, and ListInstances reports each as Unknown because loadMetadata rejects the ID mismatch. Exact lookup maps that same mismatch to 404, so the ghosts appear in the list but cannot be fetched or deleted through the API.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2063699. Configure here.

Comment thread lib/instances/fork.go Resolved

This branch has not been deployed

No deployments
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