-
Notifications
You must be signed in to change notification settings - Fork 286
Operator doesn't wait for successful queue synchronization on shutdown #1595
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
Comments
Note: do NOT delete or convert this issue to a discussion. I instructed @ViliusS to open this issue, based on this rabbitmq-users thread - https://groups.google.com/g/rabbitmq-users/c/YgP9aTBaRVs |
I don't think it will make a difference. See for example the hands-on exercise from Kubernetes docs: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ Where they set a pre-stop hook for NGINX using multiple commands, separated by Do you have evidence that our pre-stop hook is not working as intended? |
I cannot verify it on these exact commands, but it should make a difference. This is a simple test with one command returning success (0) and one fake command returning false.
See how The difference in Kubernetes' docs is that they use |
My understanding is that all commands in the |
|
I thought I commented the other day but I guess I didn't hit "Comment"... Anyway, @ViliusS please feel free to submit a PR to change the |
Done. I didn't want to do PR initially because I don't really have Go knowledge or ways to fully test this. Hopefully PR is OK. |
Describe the bug
On graceful shutdown currently operator calls
rabbitmq-upgrade await_online_quorum_plus_one -t X; rabbitmq-upgrade await_online_synchronized_mirror -t X; rabbitmq-upgrade drain -t X
(where X is graceful timeout). It was probably meant to berabbitmq-upgrade await_online_quorum_plus_one -t X && rabbitmq-upgrade await_online_synchronized_mirror -t X && rabbitmq-upgrade drain -t X
so that the drain is executed only after synchronization returns success (0) and the whole preStop hook is processed as one true/false condition.The text was updated successfully, but these errors were encountered: