Closed AnveshGoud closed 3 years ago
cacheops passes CACHEOPS_SENTINEL
argument as is mostly. If Sentinel
constructor provides a way to pass a password then you just add the same thing to CACHEOPS_SENTINEL
. If it doesn't it is redis-py issue.
I looked at Sentinel
constructor code and looks like it has sentinel_kwargs
for this.
@Suor But the password is not for sentinel and could be different. And master_for
takes password as a parameter. We have fixed it in our code as below
sentinel.master_for(
settings.CACHEOPS_SENTINEL['service_name'],
redis_class=client_class,
db=settings.CACHEOPS_SENTINEL.get('db', 0),
password='password'
)
Sentinel constructor code and looks like it has
sentinel_kwargsfor this.
This works only if Sentinel has authorisation but not redis master and there is no issue in using that
From reading Sentinel.__init__()
code I see that you can pass both sentinel_kwargs["password"]
and password
.
There should be option to provide password in case redis instance needs password over sentinel.
I work in an environment where password is required for both sentinel master and redis master.
there should be possibility to pass password value for below snippet in
redis_client
method,cacheops/redis.py