From b9a633d0eb5a73ee7ce0f6e693a93cd51c06d7d7 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Wed, 2 Dec 2026 12:36:59 +0100 Subject: [PATCH] fix(claw): keep one daemon through a rollout The chart asserts one replica and left the default RollingUpdate, which starts the new pod before the old one is gone. On this cluster both land on one node, where Longhorn lets the second mount the read-write-once volume, so an upgrade ran two daemons over one SQLite store for the seconds in between. Boot recovery reads the leases it finds as the turns a dead process left and releases them as superseded, which holds only while one daemon writes the file. A second daemon booting beside a live one would take its turns out from under it. Recreate ends the old pod first. The daemon handles SIGTERM now, so it cuts the turn in flight and writes it back before the next pod starts. helm lint --strict and the template render pass. --- deploy/helm/rhema-claw/templates/deployment.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deploy/helm/rhema-claw/templates/deployment.yaml b/deploy/helm/rhema-claw/templates/deployment.yaml index 8cf3794..00a227c 100644 --- a/deploy/helm/rhema-claw/templates/deployment.yaml +++ b/deploy/helm/rhema-claw/templates/deployment.yaml @@ -13,6 +13,15 @@ metadata: {{- include "rhema-claw.labels" . | nindent 4 }} spec: replicas: 1 + # One writer at a time. The default RollingUpdate starts the new pod + # before the old one is gone, and on this cluster both land on one + # node, where Longhorn lets the second mount the read-write-once + # volume: two daemons share the store for the seconds in between. + # Boot recovery assumes the leases it finds name a process that died, + # so the second daemon would take the first one's live turns out from + # under it. Recreate keeps that assumption true. + strategy: + type: Recreate selector: matchLabels: {{- include "rhema-claw.selectorLabels" . | nindent 6 }}