rabbitmq / cluster-operator

RabbitMQ Cluster Kubernetes Operator
https://www.rabbitmq.com/kubernetes/operator/operator-overview.html
Mozilla Public License 2.0
881 stars 272 forks source link

Ignore mirroring related shutdown errors #1740

Closed mkuratczyk closed 1 month ago

mkuratczyk commented 1 month ago

RabbitMQ 4.0 doesn't include the mirroring-specific command rabbitmq-upgrade await_online_synchronized_mirror. Therefore, the preStop hook would fail on 4.0, leading to the maintenance mode not getting enabled at all (the moment a command fails in preStop, the shutdown process continues as if preStop completed).

This approach should make the Operator compatible with 3.x and 4.x.

This closes #1734