Skip to content

registry v3 documentation does not mention MasterName option for Redis that is required for Sentinel to work #4638

Closed

Description

@afunix

Description

UniversalOptions of go-redis mention MasterName option ( https://pkg.go.dev/github.com/redis/go-redis/v9#UniversalOptions ) which is used to enable Redis Sentinel.

Redis configuration options section ( https://github.com/distribution/distribution/blob/main/docs/content/about/configuration.md#redis ) does not mention this option, so there is no way for a regular user to find out how to enable Sentinel.

Reproduce

  1. start registry version 3.0.0 with REGISTRY_REDIS_OPTIONS_ADDRS configured to multiple hostnames of Redis Sentinel cluster
  2. Registry reports only using redis as cache, nothing appears in Redis database:
time="2025-05-19T22:11:56.305491792Z" level=info msg="using redis blob descriptor cache" environment=development go.version=go1.23.7 instance.id=5555f949-d40b-44ad-b828-35134aadd751 service=registry version=3.0.0

Expected behavior

Registry is able to discover Redis Sentinel nodes, eg:

redis: 2025/05/19 22:12:04 sentinel.go:762: sentinel: discovered new sentinel="XXXX:26379" for master="YYYY"
redis: 2025/05/19 22:12:04 sentinel.go:762: sentinel: discovered new sentinel="XXXX:26379" for master="YYYY"
redis: 2025/05/19 22:12:04 sentinel.go:762: sentinel: discovered new sentinel="XXXX:26379" for master="YYYY"
redis: 2025/05/19 22:12:04 sentinel.go:762: sentinel: discovered new sentinel="XXXX:26379" for master="YYYY"
redis: 2025/05/19 22:12:04 sentinel.go:762: sentinel: discovered new sentinel="XXXX:26379" for master="YYYY"

Keys starts to appear in Redis DB.

registry version

3.0.0

Additional Info

setting REGISTRY_REDIS_OPTIONS_MASTERNAME to a correct name enables Sentinel in go-redis

Activity

  1. milosgajdos commented on May 21, 2025

    @milosgajdos
    Member

    Feel free to open a PR for docs update.

  2. added a commit that references this issue on Sep 22, 2026
    0763411
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions