8000 Ignoring unrecognized environment variable REGISTRY_REDIS_ADDRS · Issue #4621 · distribution/distribution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ignoring unrecognized environment variable REGISTRY_REDIS_ADDRS #4621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
afunix opened this issue Apr 12, 2025 · 4 comments
Open

Ignoring unrecognized environment variable REGISTRY_REDIS_ADDRS #4621

afunix opened this issue Apr 12, 2025 · 4 comments

Comments

@afunix
Copy link
afunix commented Apr 12, 2025

Description

I’ve migrated to registry v3 since it is officially out to have Redis Sentinel support.
Configuration format for Redis changed a bit, but the convention in environment variables naming is still the same in v3 (according to https://github.com/distribution/distribution/blob/main/docs/content/about/configuration.md).
I’m setting a number of env vars to configure the registry (among others REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR, REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY, etc), however all Redis-related variables are reported as unknown:

time="2025-04-12T14:11:38Z" level=warning msg="Ignoring unrecognized environment variable REGISTRY_REDIS_ADDRS"
time="2025-04-12T14:11:38Z" level=warning msg="Ignoring unrecognized environment variable REGISTRY_REDIS_DB"

Is there a bug in documentation? Is there a bug in Redis configuration?

Reproduce

export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=redis
export REGISTRY_REDIS_ADDRS=“[something:26379]”
export REGISTRY_REDIS_DB=2

start registry v3

Expected behavior

registry successfully connects to Redis Sentinel

registry version

registry github.com/distribution/distribution/v3 3.0.0

Additional Info

No response

@milosgajdos
Copy link
Member

See #4486 (comment) for a workaround

@dennis-wielepsky
Copy link
dennis-wielepsky commented Apr 14, 2025

@afunix that works for me: export REGISTRY_REDIS_OPTIONS_ADDRS='["redis:6379"]'

It looks like the environment variable parsing mechanism does not respect the yaml inline directive for OPTIONS, so it's mandatory to add that to your env variables.

@afunix
Copy link
Author
afunix commented Apr 17, 2025

Thanks for the workaround. I hope it will be fixed with documentation or in the code.

@jnovack
Copy link
jnovack commented Apr 24, 2025

For those of you who stumbled here for docker-compose/docker stack deploy

    environment:
      REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR: redis
      REGISTRY_REDIS_OPTIONS_ADDRS: "[redis:6379]"       

49BB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0