-
Notifications
You must be signed in to change notification settings - Fork 146
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
[stable/redis-ha][BUG] Pre-stop hook unsuccessful #207
Comments
@StefanKarlsson321 This is with AUTH enabled presumably? |
Yes with both redis and sentinel AUTH enabled. Hmm, now when I look at it I can see more detail on the AUTH failed message:
|
I'll see if I can figure on why I sometimes get |
I have this same issue and I determined that the problem is that while the What is required is for I have patched my configs, in a resourceful way (i.e not very pretty, but functional), by adding this preStop:
exec:
command:
- /bin/sh
- -c
- until [ $(/health/redis_readiness.sh) != "response=PONG" ]; do sleep
1; done This change uses the already existing This one was a big point of frustration for us as we have some 3rd party platforms with very poor failure handing in redis, so we would get "ghost" outages up to multiple times a week where there were random ~10 seconds outages, due to the sentinel config setting |
Ok there are a few reasons for this:
|
Describe the bug
Pre-stop hook fails with:
"PreStop hook failed" err="command '/bin/sh /readonly-config/trigger-failover-if-master.sh' exited with 1: Could not connect to Redis at localhost:26379: Connection refused\n"
Sometimes I have seen:
error: command '/bin/sh /readonly-config/trigger-failover-if-master.sh' exited with 1: Warning: AUTH failed
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Failover triggered on master.
Additional context
Have tried with chart 4.15.0 and 4.17.1 and redis 6.2.5 as well as redis 6.2.6. Seems it is the same behaviour. Also tried with and without exporter. Could it be due to that the sentinel container is terminated first? Auth and sentinel auth is configured.
The text was updated successfully, but these errors were encountered: