Skip to content

Fix cleanup retries after container creation fails - #1018

Open
tetsuo wants to merge 1 commit into
apple:mainfrom
tetsuo:fix/retry-container-cleanup
Open

tetsuo wants to merge 1 commit into
apple:mainfrom
tetsuo:fix/retry-container-cleanup

Conversation

@tetsuo

@tetsuo tetsuo commented Nov 16, 2026

Copy link
Copy Markdown

When LinuxContainer.create() fails after starting a VM, it tries to stop the VM. If that stop attempt also fails, the container loses access to the VM. Calling container.stop() afterward throws the original startup error and leaves the VM running.

This change retains the VM and relay manager after failed cleanup, so container.stop() can retry. Completed cleanup steps are not repeated. Failed relay-listener removal also remains retryable, and relays that have already stopped are removed from the cleanup list.

Tested on Apple silicon with macOS 26.6.2 and Swift 6.3.2

Container creation retains unfinished VM cleanup after rollback fails. Relay cleanup removes completed relays and retries listener removal after errors so stop() can finish after a transient failure.

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