Skip to content
Snippets Groups Projects
Commit 648870d2 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "RabbitMQ: Support setting ha-promote-on-shutdown"

parents d6bfec4a 94f3ce0c
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,11 @@ rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none +sbwtdcpu none +sbwtdio
rabbitmq_tls_options: {}
# To avoid split-brain
rabbitmq_cluster_partition_handling: "pause_minority"
# For consistency use "when-synced", for availability use "always"
# The rabbitmq default for ha queues is "when-synced"
# More details see:
# https://www.rabbitmq.com/ha.html#promoting-unsynchronised-mirrors
rabbitmq_ha_promote_on_shutdown:
rabbitmq_extra_config: {}
####################
......
......@@ -18,8 +18,8 @@
],
{% if om_enable_rabbitmq_high_availability | bool %}
"policies":[
{"vhost": "/", "name": "ha-all", "pattern": "^(?!(amq\\.)|(.*_fanout_)|(reply_)).*", "apply-to": "all", "definition": {"ha-mode":"all"}, "priority":0}{% if project_name == 'outward_rabbitmq' %},
{"vhost": "{{ murano_agent_rabbitmq_vhost }}", "name": "ha-all", "pattern": "^(?!(amq\\.)|(.*_fanout_)|(reply_)).*", "apply-to": "all", "definition": {"ha-mode":"all"}, "priority":0}
{"vhost": "/", "name": "ha-all", "pattern": "^(?!(amq\\.)|(.*_fanout_)|(reply_)).*", "apply-to": "all", "definition": {"ha-mode":"all"{% if rabbitmq_ha_promote_on_shutdown is not none %},"ha-promote-on-shutdown":"{{ rabbitmq_ha_promote_on_shutdown }}"{% endif %}}, "priority":0}{% if project_name == 'outward_rabbitmq' %},
{"vhost": "{{ murano_agent_rabbitmq_vhost }}", "name": "ha-all", "pattern": "^(?!(amq\\.)|(.*_fanout_)|(reply_)).*", "apply-to": "all", "definition": {"ha-mode":"all"{% if rabbitmq_ha_promote_on_shutdown is not none %},"ha-promote-on-shutdown":"{{ rabbitmq_ha_promote_on_shutdown }}"{% endif %}}, "priority":0}
{% endif %}
]
{% else %}
......
---
features:
- |
The config option `rabbitmq_ha_promote_on_shutdown` has been added, which
allows changing the RabbitMQ definition `ha-promote-on-shutdown`. By
default `ha-promote-on-shutdown` is "when-synced". We recommend changing
this to be "always". This basically means we don't mind losing some
messages, instead we give priority to rabbitmq availability. This is most
relevant when restarting rabbitmq, such as when upgrading. Note that
setting the value of this flag, even to the default value of "when-synced",
will cause RabbitMQ to be restarted on the next deploy.
For more details please see:
https://www.rabbitmq.com/ha.html#cluster-shutdown
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment