Skip to content

ateom-microvm: recover when the guest dies before the kata-agent answers (on a contended host) - #655

Merged
Dmitry Berkovich (dberkov) merged 1 commit into
agent-substrate:mainfrom
BenTheElder:microvm-guest-boot-retry
Jul 31, 2026
Merged

Dmitry Berkovich (dberkov) merged 1 commit into
agent-substrate:mainfrom
BenTheElder:microvm-guest-boot-retry

Conversation

@BenTheElder

Copy link
Copy Markdown
Collaborator

Fixes #619

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

A resume can fail with a bare `dial unix /run/vc/vm/<uid>/clh.sock: connect:
no such file or directory`, one minute after it started (agent-substrate#619). The socket
was there — the caller waits for it before dialing — so it went away while
we polled, and cloud-hypervisor unlinks it in the vsock device's shutdown:
the guest died during boot. Under a contended host the guest's boot stretches
badly (measured: systemd reaching its default target 25s in, versus about a
second when idle), and a boot that stalls long enough is torn down guest-side.

So treat ENOENT as what it is. Instead of polling a socket that cannot come
back, and reporting the last dial error as if it were the problem, give up at
once with an error that names the cause, and retry the cold boot: a guest that
never reached its agent ran none of the actor's containers, and the failure
path tears the whole attempt down, so starting over is safe — and it is the
only recovery, since the dead VM is not coming back. Each retry is logged with
the guest's boot diagnostics (the console tail, plus each virtiofsd's log,
because cloud-hypervisor also stops the VM when a vhost-user backend dies and
that leaves the console silent).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm
LGTM

@dberkov
Dmitry Berkovich (dberkov) merged commit 03eb099 into agent-substrate:main Jul 31, 2026
11 checks passed
@BenTheElder
Benjamin Elder (BenTheElder) deleted the microvm-guest-boot-retry branch August 4, 2026 19:29
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.

TestDurableDirLifecycle e2e test flaking

3 participants