Skip to content

Remove a stale containerd pid on start - #112

Open
tigerblue77 wants to merge 2 commits into
linuxserver:masterfrom
tigerblue77:claude/loving-hopper-f527pj-containerd-pid
Open

tigerblue77 wants to merge 2 commits into
linuxserver:masterfrom
tigerblue77:claude/loving-hopper-f527pj-containerd-pid

Conversation

@tigerblue77

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

init-config-kasm now removes /var/run/docker/containerd/containerd.pid, next to the stale docker.sock it already removes. It runs before dockerd, when no containerd can be running in the container, so any such file is left over from an unclean shutdown.

Benefits of this PR and context:

closes #110

dockerd no longer takes whatever process was given the stale pid for its containerd, so it starts after an unclean shutdown, and svc-kasm does not fail along with it.

How Has This Been Tested?

lscr.io/linuxserver/kasm:1.19.0-ls150, docker kill kasm, pid file set to 1, docker start kasm:

  • without this PR: failed to start containerd: timeout waiting for containerd to start in a loop, unable to start service svc-kasm, and Kasm stays down;
  • with it: Kasm starts normally, svc-kasm is up (s6-rc -a list), and finish runs on the next docker stop.

Source / References:

/run is not a tmpfs, so an unclean shutdown leaves
/run/docker/containerd/containerd.pid behind. If another process has
been given that pid by the time dockerd starts, dockerd takes it for a
running containerd, never starts one and gives up with "timeout waiting
for containerd to start". Nothing can be running yet when
init-config-kasm runs, so remove the file there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RmwHZxdRuWgp9chBZTZTMn
@tigerblue77

Copy link
Copy Markdown
Author

Hi @thespad & @thelamer, can you have a look please ? 😉🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[BUG] Kasm does not start after an unclean shutdown when the stale containerd pid belongs to another process

3 participants