Skip to content

Commit 4f502f2

Browse files
authored
redis/valkey: Adopt to recent log format from sentinel (#203)
* redis/valkey: Adopt to recent log format from sentinel Since Redis 7.2, the log line used to ensure the sentinel is started is emitted with a different prefix. Make sure that both of the old one and new one are accepted. Fixes #202 * Add missing valkey packages to run tests ... and also fix missing redis-sentinel package.
1 parent bcad8b3 commit 4f502f2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ARG ETCD_VERSION=3.4.13
1010
RUN apt-get update -y && apt-get install -qy gnupg software-properties-common
1111
RUN add-apt-repository -y ppa:deadsnakes/ppa
1212
RUN apt-get -qq update -y \
13-
&& apt-get install -y mysql-server redis-server zookeeper nodejs npm ceph librados-dev \
13+
&& apt-get install -y mysql-server redis-server redis-sentinel valkey-server valkey-sentinel \
14+
zookeeper nodejs npm ceph librados-dev \
1415
python3 python3-dev python3-pip python3-virtualenv \
1516
python3.10 python3.10-dev python3.10-distutils \
1617
python3.11 python3.11-dev \

pifpaf/drivers/redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _setUp(self):
7878

7979
c, _ = self._exec(
8080
["redis-sentinel", cfg],
81-
wait_for_line=r"# Sentinel (runid|ID) is")
81+
wait_for_line=r"[#\*] Sentinel (runid|ID) is")
8282

8383
self.addCleanup(self._kill, c)
8484

pifpaf/drivers/valkey.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _setUp(self):
7878

7979
c, _ = self._exec(
8080
["valkey-sentinel", cfg],
81-
wait_for_line=r"# Sentinel (runid|ID) is")
81+
wait_for_line=r"[#\*] Sentinel (runid|ID) is")
8282

8383
self.addCleanup(self._kill, c)
8484

0 commit comments

Comments
 (0)