From ee5959520dd668b282c67d47be3c38b9015fe210 Mon Sep 17 00:00:00 2001 From: Roman Vanicek Date: Fri, 27 Feb 2026 13:24:47 +0000 Subject: [PATCH] CTDB must be run under init process --- Dockerfile | 1 + entrypoint.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 17404b2..2e32fd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,7 @@ RUN apt-get -y update && \ supervisor \ cups \ ctdb \ + tini \ samba-exporter && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ diff --git a/entrypoint.sh b/entrypoint.sh index 1a87007..cce0427 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -41,7 +41,9 @@ if [ "$1" = "ctdb" ]; then mkdir -p "$CLUSTER_SYSDIR_LOCAL/ctdb-run" rm -rf /run/ctdb ln -s "$CLUSTER_SYSDIR_LOCAL/ctdb-run" /run/ctdb - exec /usr/sbin/ctdbd --interactive + + # We cannot run as PID 1 due to orphans (see https://lists.samba.org/archive/samba-technical/2021-July/136753.html) + exec tini -- /usr/sbin/ctdbd --interactive fi if [ -z "$NETBIOS_NAME" ]; then