Rabbit policies now overrideable by deployers
Previously the role assumed that all deployers wanted all queues to be HA. Performance testing by Mirantis and Intel has suggested that throughput increases can be dramatic when disabling HA queues, see: http://docs.openstack.org/developer/performance-docs/test_results/mq/rabbitmq/index.html Therefore, we should allow deployers to set their own policies when desired. Change-Id: I156b8618e78d74823ec568053157afc853baad84 Closes-Bug: #1607830
This commit is contained in:
parent
4debe62fee
commit
75d8dac4d0
@ -82,3 +82,32 @@ rabbitmq_management_rates_mode: basic
|
||||
|
||||
# Precompile RabbitMQ with HiPE
|
||||
rabbitmq_hipe_compile: False
|
||||
|
||||
# RabbitMQ policies
|
||||
# Used to tune performance characteristics of OpenStack messaging
|
||||
#
|
||||
# Example override that uses HA queues only for telemetry and sets message
|
||||
# expiry for RPC messages
|
||||
#
|
||||
# rabbitmq_policies:
|
||||
# - name: "heat_rpc_expire"
|
||||
# pattern: '^heat-engine-listener\\.'
|
||||
# tags: "expires=3600000"
|
||||
# priority: 1
|
||||
# - name: "results_expire"
|
||||
# pattern: '^results\\.'
|
||||
# tags: "expires=3600000"
|
||||
# priority: 1
|
||||
# - name: "tasks_expire"
|
||||
# pattern: '^results\\.'
|
||||
# tags: "expires=3600000"
|
||||
# priority: 1
|
||||
# - name: "ha-notif"
|
||||
# pattern: '^(event|metering|notifications)\.'
|
||||
# tags: "ha-sync-mode=automatic"
|
||||
# priority: 0
|
||||
#
|
||||
rabbitmq_policies:
|
||||
- name: "HA"
|
||||
pattern: '^(?!amq\.).*'
|
||||
tags: "ha-mode=all"
|
||||
|
6
releasenotes/notes/policy-override-522df5699f09c417.yaml
Normal file
6
releasenotes/notes/policy-override-522df5699f09c417.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- The ``rabbitmq_server`` role now supports deployer override of the
|
||||
RabbitMQ policies applied to the cluster. Deployers can
|
||||
override the ``rabbitmq_policies`` variable, providing a list of
|
||||
desired policies.
|
@ -25,10 +25,12 @@
|
||||
- name: Enable queue mirroring
|
||||
rabbitmq_policy:
|
||||
node: "rabbit@{{ ansible_hostname }}"
|
||||
name: "HA"
|
||||
pattern: '^(?!amq\.).*'
|
||||
tags: "ha-mode=all"
|
||||
name: "{{ item.name }}"
|
||||
pattern: "{{ item.pattern }}"
|
||||
priority: "{{ item.priority | default(0) }}"
|
||||
tags: "{{ item.tags }}"
|
||||
register: rabbitmq_queue_mirror
|
||||
with_items: "{{ rabbitmq_policies }}"
|
||||
tags:
|
||||
- rabbitmq-config
|
||||
- rabbitmq-cluster
|
||||
|
@ -65,3 +65,12 @@
|
||||
- name: Ensure expected version of rabbitmq is running
|
||||
assert:
|
||||
that: rabbitmqctl_status.stdout | search ("rabbit,\"RabbitMQ\",\"{{ rabbitmq_release_version }}\"")
|
||||
- name: Get the policy list
|
||||
command: rabbitmqctl -q list_policies
|
||||
register: rabbitmq_policies_output
|
||||
- debug:
|
||||
var: rabbitmq_policies.stdout
|
||||
# Expected policy: "/ HA all ^(?!amq\\.).* {"ha-mode":"all"} 0"
|
||||
- name: Validate that the expected policies are present
|
||||
assert:
|
||||
that: rabbitmq_policies_output.stdout | search("amq")
|
||||
|
Loading…
Reference in New Issue
Block a user