From 2dc2a45c13310e1bf741d6b7078b0ccce469ab29 Mon Sep 17 00:00:00 2001 From: sHa Date: Thu, 29 Oct 2026 10:12:15 +0200 Subject: [PATCH] rflood 0.2.4: remove the stale rTorrent lock and socket at pod start An unclean stop leaves the lock file in the session directory. rTorrent then exits and the pod loops in CrashLoopBackOff. An init container now removes both files. --- rflood/Chart.yaml | 2 +- rflood/templates/deployment.yaml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rflood/Chart.yaml b/rflood/Chart.yaml index a45efb3..752e1be 100644 --- a/rflood/Chart.yaml +++ b/rflood/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: rflood description: rTorrent + Flood (jesec/rtorrent-flood) Helm chart type: application -version: 0.2.3 +version: 0.2.4 appVersion: "4.14.2" annotations: version-source: dockerhub-tags-pattern:jesec/rtorrent-flood:^[0-9]+\.[0-9]+\.[0-9]+$ diff --git a/rflood/templates/deployment.yaml b/rflood/templates/deployment.yaml index e782ee8..2596f93 100644 --- a/rflood/templates/deployment.yaml +++ b/rflood/templates/deployment.yaml @@ -37,6 +37,17 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} + initContainers: + # An unclean stop (node reboot, OOM kill) leaves a stale lock and socket on the config volume. + # rTorrent then refuses to start. The Recreate strategy and the RWO volume guarantee that no other + # rTorrent uses this session directory, so removing both files is safe. + - name: clean-stale-locks + image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["sh", "-c", "rm -f /config/session/rtorrent.lock {{ .Values.rtorrentSocket }}"] + volumeMounts: + - name: config + mountPath: /config containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"