spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.49k stars 357 forks source link

Fix command line for Redis liveness probe #576

Closed mpihlak closed 1 year ago

mpihlak commented 1 year ago

Fixes always succeeding liveness probe described in #575

Changes proposed on the PR:

samof76 commented 1 year ago

@mpihlak why do we do a grep, isn't exit status 1 not returned when ping fails?

mpihlak commented 1 year ago

@mpihlak why do we do a grep, isn't exit status 1 not returned when ping fails?

redis-cli is not returning proper exit status in this case:

/data $ redis-cli -h localhost -p 6379 ping --user pinger --pass pingpass --no-auth-warning
(error) NOAUTH Authentication required.
/data $ echo $?
0

There's also this issue open on the Redis side and some other issues mentioning error statuses not properly returned.

ese commented 1 year ago

Thanks @mpihlak Could you merge with master to fix CI?

mpihlak commented 1 year ago

Rebased to master and fixed a couple of tests. Should be good now.