From: Zack Cerza Date: Tue, 8 Jul 2025 16:29:42 +0000 (-0600) Subject: Enable linger for the Jenkins user X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0521e6c252aa0e019fe9e9753275d0d4468b8f5b;p=ceph-build.git Enable linger for the Jenkins user This fixes errors like: RunRoot is pointing to a path (/run/user/$ID/containers) which is not writable. Most likely podman will fail. Error: creating events dirs: mkdir /run/user/$ID: permission denied Signed-off-by: Zack Cerza --- diff --git a/scripts/setup_container_runtime.sh b/scripts/setup_container_runtime.sh index 8235d705..375bcaad 100755 --- a/scripts/setup_container_runtime.sh +++ b/scripts/setup_container_runtime.sh @@ -25,6 +25,9 @@ function setup_container_runtime () { fi if command -v podman; then + if ! [ -d /run/user/$(id -u) -a -w /run/user/$(id -u) ]; then + sudo loginctl enable-linger $(id -nu) + fi PODMAN_MAJOR_VERSION=$(podman version -f json | jq -r '.Client.Version|split(".")[0]') if [ "$PODMAN_MAJOR_VERSION" -ge 4 ]; then PODMAN_DIR="$HOME/.local/share/containers"