From fc371711ecd7c647bc406450711a2847d6ac611d Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sat, 9 May 2026 12:56:54 +0200 Subject: [PATCH] fix(deploy): StartLimit* directives belong in [Unit], not [Service] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemd 230+ moved StartLimitBurst= and StartLimitIntervalSec= from [Service] into [Unit] (with the rename from StartLimitInterval=). Putting them in [Service] makes systemd silently ignore them with a warning to journalctl: "Unknown key 'StartLimitIntervalSec' in section [Service], ignoring." — meaning the restart-loop cap I claimed in commit 519567e wasn't actually applied. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../local/lib/systemd/system/left4me-server@.service | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/files/usr/local/lib/systemd/system/left4me-server@.service b/deploy/files/usr/local/lib/systemd/system/left4me-server@.service index db291b3..e9d226b 100644 --- a/deploy/files/usr/local/lib/systemd/system/left4me-server@.service +++ b/deploy/files/usr/local/lib/systemd/system/left4me-server@.service @@ -2,6 +2,11 @@ Description=left4me server instance %i After=network-online.target Wants=network-online.target +# Bound the restart loop. Without these, a persistent ExecStartPre or +# ExecStart failure spins indefinitely. Note: these are [Unit]-section +# directives (systemd 230+), not [Service]. +StartLimitBurst=5 +StartLimitIntervalSec=60s [Service] Type=simple @@ -29,11 +34,6 @@ ExecStartPre=+/usr/local/libexec/left4me/left4me-overlay mount %i ExecStart=/var/lib/left4me/installation/srcds_run -game left4dead2 +hostport ${L4D2_PORT} $L4D2_ARGS Restart=on-failure RestartSec=5 -# Bound the restart loop. Without these, a persistent ExecStartPre or -# ExecStart failure spins indefinitely (default systemd has no cap when -# Restart= is explicitly set without StartLimit*). -StartLimitBurst=5 -StartLimitIntervalSec=60s # Resource control baseline — see docs/superpowers/specs/2026-05-09-l4d2-server-host-perf-baseline-design.md Slice=l4d2-game.slice