From c381cd4e9b96fa8fed84aab8c75b986c28f5e5c5 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Thu, 30 Jul 2026 09:43:37 +0100 Subject: [PATCH] CI: stop dpkg starting redis-server on the Windows/WSL job We hand-start every server instance the tests need, so drop a policy-rc.d that tells invoke-rc.d/deb-systemd-invoke not to start services at all. The packaged redis-server unit would otherwise race our own primary for 127.0.0.1:6379 on any run where WSL came up with systemd. That also sidesteps an install hang we saw with the 8.10.0 package: its redis.conf lost "supervised auto", so redis never sd_notify()s, the Type=notify unit never leaves "activating", and the postinst's "systemctl start" blocks (indefinitely, since redis then can't save its RDB on SIGTERM and the unit disables the stop timeout). That is an upstream packaging slip which they are already fixing, so this isn't a permanent change in behaviour from 8.10 - but not starting the service is the right thing for this job regardless. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/CI.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4cd70e0a7..09ac62e08 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -57,6 +57,16 @@ jobs: chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list apt-get update + # Don't let dpkg start the packaged redis-server service: we start our own + # instances below, and the packaged unit would otherwise race them for + # 127.0.0.1:6379 on any run where WSL came up with systemd. + # This also sidesteps an install hang we hit with the 8.10.0 package, whose + # redis.conf lost "supervised auto" - redis then never sd_notify()s, so the + # Type=notify unit never leaves "activating" and the postinst's + # "systemctl start" blocks. That one's an upstream packaging slip being + # fixed there, but the guard above is worth keeping either way. + printf '#!/bin/sh\nexit 101\n' > /usr/sbin/policy-rc.d + chmod +x /usr/sbin/policy-rc.d apt-get install -y redis mkdir redis - name: Run redis-server