RabbitMQ: Support setting ha-promote-on-shutdown
By default ha-promote-on-shutdown=when-synced. However we are seeing issues with RabbitMQ automatically recovering when nodes are restarted. https://www.rabbitmq.com/ha.html#cluster-shutdown Rather than waiting for operator interventions, it is better we allow recovery to happen, even if that means we may loose some messages. A few failed and timed out operations is better than a totaly broken cloud. This is achieved using ha-promote-on-shutdown=always. Note, when a node failure is detected, this is already the default behaviour from 3.7.5 onwards: https://www.rabbitmq.com/ha.html#promoting-unsynchronised-mirrors This patch adds the option to change the ha-promote-on-shutdown definition, using the flag `rabbitmq_ha_promote_on_shutdown`. This value is unset by default to avoid any unexpected changes to the RabbitMQ definitions.json file, as that would trigger an unexpected restart of RabbitMQ during the next deploy. Related-Bug: #1954925 Change-Id: I2146bda2c72ddac2c9923c6941b0596395fd9ab5
Showing
- ansible/roles/rabbitmq/defaults/main.yml 5 additions, 0 deletionsansible/roles/rabbitmq/defaults/main.yml
- ansible/roles/rabbitmq/templates/definitions.json.j2 2 additions, 2 deletionsansible/roles/rabbitmq/templates/definitions.json.j2
- releasenotes/notes/rabbitmq-ha-promote-on-shutdown-9099c6643f2d0cce.yaml 13 additions, 0 deletions...tes/rabbitmq-ha-promote-on-shutdown-9099c6643f2d0cce.yaml
Please register or sign in to comment