๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by pfl Tue, 01 Dec 2026 13:10
Bug#1156022: patroni: patroni@.service still has Restart=no, upstream changed to Restart=on-failure in 2.1.5
#7001
Author: pfl
Date: Tue, 01 Dec 2026 13:10
36 lines
3204 bytes
Package: patroni
Version: 4.1.5-3

Hello,

the unit template patroni@.service of the Debian packaging has

    # Do not restart the service if it crashes, we want to manually inspect database on failure
    Restart=no

(https://salsa.debian.org/postgresql/patroni/-/raw/master/debian/patroni@.service, line 36)

Upstream had the same two lines in extras/startup-scripts/patroni.service. They were changed to "Restart=on-failure" in https://github.com/patroni/patroni/pull/2372, merged on 2022-08-01 and released with 2.1.5. The line in debian/patroni@.service was last touched in 2018 (commit 66706ec), so it looks like the change was never carried over.

What happened to us with patroni 4.1.5-3.pgdg22.04+1 on Ubuntu 22.04:

- The kernel OOM killer killed one postgres backend on the leader.
- systemd stopped the whole unit 6 seconds later ("Failed with result 'oom-kill'"). The unit sets no OOMPolicy, so the systemd default "stop" applies.
- The unit stayed down for 3 hours and 36 minutes, until we started it by hand. The node then rejoined as a replica without problems.

We now run a drop-in with Restart=on-failure. I tested on the same host that a unit with OOMPolicy=stop, KillMode=process and Restart=on-failure is started again after an OOM kill.

Is Restart=no still intended in the Debian unit? If not, could it follow upstream? The change would be, with upstream's wording:

-# Do not restart the service if it crashes, we want to manually inspect database on failure
-Restart=no
+# Restart the service if it crashed
+Restart=on-failure

Thanks for the packages.

--
Marc Pfaendler
Sourcepole AG, Zรผrich, Switzerland
www.sourcepole.ch
Phone: +41 44 440 77 11
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads