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.
This commit is contained in:
sha committed 2026-10-29 10:12:28 +02:00
1 parent e30519fc81
commit 2dc2a45c13
2 files changed
+12 -1

No files matched your search

+11
View File
@@ -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 }}"