Open byErikas opened 1 year ago
I've managed to narrow it down to a problem with the REDISCLI_AUTH
variable, please take a look at https://github.com/bitnami/containers/pull/35992 for a fix that seems to work atleast for my enviroment.
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 REDISCLI_AUTH
from a file (see https://github.com/bitnami/containers/pull/39867) due to them causing some problems when redis was configured without a password.
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 ALLOW_EMPTY_PASSWORD=no
(default).
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
redis-node-5
logs shows
Node redis-node-0 not ready, waiting for all the nodes to be ready...
And all nodes are role:master
, nobody is a slave.
I have no issue when changing the env variables as below:
ALLOW_EMPTY_PASSWORD: yes
#REDIS_MASTER_PASSWORD: myredispassword
#REDIS_PASSWORD: myredispassword
#REDIS_PASSWORD_FILE: /opt/redis/password.txt
What am i missing? Any input is appreciated!
Best, Dave
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