-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[bitnami/redis-cluster] nodes never ready if using REDIS_PASSWORD_FILE instead of REDIS_PASSWORD #35982
Comments
I've managed to narrow it down to a problem with the |
Thanks for creating this issue and the associated PR. The team will review it and provide feedback. Once merged the PR, this issue will be automatically closed. |
Hi @byErikas I've recently reverted the changes introduced to support I've created an internal task to evaluate the feasibility of this feature and the best way to tackle it, so we'll keep the thread updated when we have more news. |
Good Day, Dont mean to hijack this post but trying something similar to what the OP is doing. Trying to understand how to set a password when Here's my compose file: services:
redis-base: &redis-base
image: docker.io/bitnami/redis-cluster:latest
environment:
#ALLOW_EMPTY_PASSWORD: yes
REDIS_MASTER_PASSWORD: myredispassword
REDIS_PASSWORD: myredispassword
REDIS_PASSWORD_FILE: /opt/redis/password.txt
REDIS_NODES: redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5
volumes:
- ./pass:/opt/redis
redis-node-0:
<<: *redis-base
container_name: redis-node-0
redis-node-1:
<<: *redis-base
container_name: redis-node-1
redis-node-2:
<<: *redis-base
container_name: redis-node-2
redis-node-3:
<<: *redis-base
container_name: redis-node-3
redis-node-4:
<<: *redis-base
container_name: redis-node-4
redis-node-5:
<<: *redis-base
container_name: redis-node-5
depends_on:
- redis-node-0
- redis-node-1
- redis-node-2
- redis-node-3
- redis-node-4
environment:
#ALLOW_EMPTY_PASSWORD: yes
REDIS_MASTER_PASSWORD: myredispassword
REDIS_PASSWORD: myredispassword
REDIS_PASSWORD_FILE: /opt/redis/password.txt
REDIS_NODES: redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5
REDIS_CLUSTER_REPLICAS: 1
REDIS_CLUSTER_CREATOR: yes
And all nodes are I have no issue when changing the env variables as below:
What am i missing? Best, |
Any progress on this? Have the same problem with a local redis-cluster setup: redis:
image: bitnami/redis-cluster:7.4
environment:
REDIS_NODES: redis redis-node-1 redis-node-2
REDIS_CLUSTER_CREATOR: yes
REDIS_CLUSTER_REPLICAS: 0
REDIS_PASSWORD: "admin"
ports:
- "6379:6379"
depends_on:
- redis-node-1
- redis-node-2
redis-node-1:
image: bitnami/redis-cluster:7.4
environment:
REDIS_PASSWORD: "admin"
REDIS_NODES: redis redis-node-1 redis-node-2
expose:
- 6379
redis-node-2:
image: bitnami/redis-cluster:7.4
environment:
REDIS_PASSWORD: "admin"
REDIS_NODES: redis redis-node-1 redis-node-2
expose:
- 6379 |
Name and Version
bitnami/redis-cluster:7.0
What architecture are you using?
amd64
What steps will reproduce the bug?
I'm trying to run a docker stack on a swarm enviroment for the redis cluster, this is how the docker-compose looks:
I've been trying to follow the setup based on the README.md over here: https://github.com/bitnami/containers/blob/main/bitnami/redis-cluster/README.md, however I need the redis password to be a secret that gets mounted on the container for redis, and I didn't see anything related to being able to use files for variables in the readme, so I went to dig around, and found that there seems to be some support for the "_FILE" variables over in this piece of the initial code https://github.com/bitnami/containers/blob/main/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/redis-cluster-env.sh#L68, however this doesn't seem to work.
I know that the "_FILE" support isn't in the documentation, and is likely not supported, bus is there any way I could set it up to read the password from a docker secret?
What is the expected behavior?
I had hopes that the cluster would start and initiate the same way it does if you simply use
REDIS_PASSWORD
in the docker-compose, as it works without any issues when configured using that, however it doesn't.What do you see instead?
What seems to happen is that either the nodes, or the cluster are never ready, looking at the logs for the container that I use to initialize the cluster I get this:
And it just keeps going forever, while if I inspect the node named
redis-node-0
I see this:Additional information
The only thing that is in my
redis_conf
that gets put intooverrides.conf
is this:so I don't think that this is a source of any issues
The text was updated successfully, but these errors were encountered: