From 2e80c670e1afd4f8c35bc8ac71b29ebd358596c2 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 23 Sep 2026 12:31:33 +0000 Subject: [PATCH] Remove a stale containerd pid on start /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 Claude-Session: https://claude.ai/code/session_01RmwHZxdRuWgp9chBZTZTMn --- readme-vars.yml | 1 + root/etc/s6-overlay/s6-rc.d/init-config-kasm/run | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/readme-vars.yml b/readme-vars.yml index 17994e7..aae42e6 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -130,6 +130,7 @@ init_diagram: | "kasm:latest" <- Base Images # changelog changelogs: + - {date: "23.09.26:", desc: "Remove a stale containerd pid on start, which could keep dockerd from starting after an unclean shutdown."} - {date: "04.08.26:", desc: "Give kasm_manager a healthcheck start period so a cold start does not leave kasm_proxy created but never started."} - {date: "16.04.26:", desc: "Update for 1.18.1 release. Use rolling service images. Bump docker to v29."} - {date: "13.11.25:", desc: "Pin docker to v28 to avoid API deprecation issues."} diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-kasm/run b/root/etc/s6-overlay/s6-rc.d/init-config-kasm/run index 24015ae..b040e7c 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-config-kasm/run +++ b/root/etc/s6-overlay/s6-rc.d/init-config-kasm/run @@ -13,6 +13,10 @@ if [[ -S /var/run/docker.sock ]]; then rm -f /var/run/docker.sock fi +# Clean up old containerd pid, which dockerd takes for a running containerd if +# another process has been given that pid since an unclean shutdown +rm -f /var/run/docker/containerd/containerd.pid + # Login to Dockerhub if [[ -n "${DOCKER_HUB_USERNAME}" ]]; then docker login --username "${DOCKER_HUB_USERNAME}" --password "${DOCKER_HUB_PASSWORD}"