Skip to content

Commit

Permalink
Redis: Use IP address in sentinel configuration
Browse files Browse the repository at this point in the history
Sentinel supports hostnames since Redis 6.2, and the support should be
explicitly enabled. See [1] for details.

[1] https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/#ip-addresses-and-dns-names

Fixes #173
  • Loading branch information
kajinamit committed Aug 15, 2024
1 parent 269e5c9 commit 6cbb3fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pifpaf/drivers/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _setUp(self):
cfg = os.path.join(self.tempdir, "redis-sentinel.conf")
sentinel_conf = """dir %s
port %d
sentinel monitor pifpaf localhost %d 1
sentinel monitor pifpaf 127.0.0.1 %d 1
""" % (self.tempdir, self.sentinel_port, self.port)
if self.password:
sentinel_conf += (
Expand Down

0 comments on commit 6cbb3fc

Please sign in to comment.