Article View: linux.debian.bugs.dist
Article #7001Bug#1156022: patroni: patroni@.service still has Restart=no, upstream changed to Restart=on-failure in 2.1.5
From: pfl
Date: Tue, 01 Dec 2026 13:10
Date: Tue, 01 Dec 2026 13:10
36 lines
3204 bytes
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
Technical Details
Message-ID:
<O5vMl-fkVY-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: pfl <pfl@sourcepole.ch> Newsgroups: linux.debian.bugs.dist Subject: Bug#1156022: patroni: patroni@.service still has Restart=no, upstream changed to Restart=on-failure in 2.1.5 Date: Tue, 01 Dec 2026 14:10:01 +0100 Message-ID: <O5vMl-fkVY-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Dec 1 13:05:10 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.651 Reply-To: pfl <pfl@sourcepole.ch>, 1156022@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+postgresql@tracker.debian.org X-Debian-Pr-Message: report 1156022 X-Debian-Pr-Package: patroni X-Debian-Pr-Source: patroni MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Greylist: delayed 1824 seconds by postgrey-1.37 at buxtehude; Tue, 01 Dec 2026 13:02:43 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006284 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 36 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 1 Dec 2026 13:32:10 +0100 X-Original-Message-ID: <aw6-LMN3oFTqyH1A@meg.localdomain>