kolla-ansible/ansible
Doug Szumski 6bfe1927f0 Remove classic queue mirroring for internal RabbitMQ
When OpenStack is deployed with Kolla-Ansible, by default there
are no durable queues or exchanges created by the OpenStack
services in RabbitMQ. In Rabbit terminology, not being durable
is referred to as `transient`, and this means that the queue
is generally held in memory.

Whether OpenStack services create durable or transient queues is
traditionally controlled by the Oslo Notification config option:
`amqp_durable_queues`. In Kolla-Ansible, this remains set to
the default of `False` in all services. The only `durable`
objects are the `amq*` exchanges which are internal to RabbitMQ.

More recently, Oslo Notification has introduced support for
Quorum queues [7]. These are a successor to durable classic
queues, however it isn't yet clear if they are a good fit for
OpenStack in general [8].

For clustered RabbitMQ deployments, Kolla-Ansible configures all
queues as `replicated` [1]. Replication occurs over all nodes
in the cluster. RabbitMQ refers to this as 'mirroring of classic
queues'.

In summary, this means that a multi-node Kolla-Ansible deployment
will end up with a large number of transient, mirrored queues
and exchanges. However, the RabbitMQ documentation warns against
this, stating that 'For replicated queues, the only reasonable
option is to use durable queues: [2]`. This is discussed
further in the following bug report: [3].

Whilst we could try enabling the `amqp_durable_queues` option
for each service (this is suggested in [4]), there are
a number of complexities with this approach, not limited to:

1) RabbitMQ is planning to remove classic queue mirroring in
   favor of 'Quorum queues' in a forthcoming release [5].
2) Durable queues will be written to disk, which may cause
   performance problems at scale. Note that this includes
   Quorum queues which are always durable.
3) Potential for race conditions and other complexity
   discussed recently on the mailing list under:
   `[ops] [kolla] RabbitMQ High Availability`

The remaining option, proposed here, is to use classic
non-mirrored queues everywhere, and rely on services to recover
if the node hosting a queue or exchange they are using fails.
There is some discussion of this approach in [6]. The downside
of potential message loss needs to be weighed against the real
upsides of increasing the performance of RabbitMQ, and moving
to a configuration which is officially supported and hopefully
more stable. In the future, we can then consider promoting
specific queues to quorum queues, in cases where message loss
can result in failure states which are hard to recover from.

[1] https://www.rabbitmq.com/ha.html
[2] https://www.rabbitmq.com/queues.html
[3] https://github.com/rabbitmq/rabbitmq-server/issues/2045
[4] https://wiki.openstack.org/wiki/Large_Scale_Configuration_Rabbit
[5] https://blog.rabbitmq.com/posts/2021/08/4.0-deprecation-announcements/
[6] https://fuel-ccp.readthedocs.io/en/latest/design/ref_arch_1000_nodes.html#replication
[7] https://bugs.launchpad.net/oslo.messaging/+bug/1942933
[8] https://www.rabbitmq.com/quorum-queues.html#use-cases

Partial-Bug: #1954925
Change-Id: I91d0e23b22319cf3fdb7603f5401d24e3b76a56e
2022-02-21 18:54:04 +00:00
..
action_plugins Remove unused imports in merge_yaml 2021-08-06 14:45:45 -07:00
filter_plugins Implement IPv6 support in the control plane 2019-10-16 10:24:35 +02:00
group_vars Merge "Add support for VMware First Class Disk (FCD)" 2022-02-21 11:07:00 +00:00
inventory Drop vmtp 2021-12-21 07:29:32 +00:00
library Refactor of kolla_docker into module_utils 2022-01-06 11:59:50 +01:00
module_utils Refactor of kolla_docker into module_utils 2022-01-06 11:59:50 +01:00
roles Remove classic queue mirroring for internal RabbitMQ 2022-02-21 18:54:04 +00:00
bifrost.yml Update "openstack_release" variable to static brach name 2019-09-16 12:42:44 +00:00
certificates.yml certificates: generate libvirt TLS certificates 2022-02-03 14:32:38 +00:00
destroy.yml
gather-facts.yml Make setup module arguments configurable 2021-07-02 10:30:35 -03:00
kolla-host.yml Merge "Support Docker CE in bootstrap-servers" 2018-12-28 12:21:26 +00:00
mariadb_backup.yml Use mariabackup for database backups 2019-11-01 18:44:10 +00:00
mariadb_recovery.yml Update "openstack_release" variable to static brach name 2019-09-16 12:42:44 +00:00
monasca_cleanup.yml Finish removing Monasca Log Transformer 2021-11-15 10:40:21 +00:00
nova.yml Fix play hosts for ironic, monasca, neutron, nova 2020-08-03 09:50:59 +01:00
octavia-certificates.yml octavia: generate certificates automatically 2020-10-08 16:50:30 +02:00
post-deploy.yml Use ansible_facts to reference facts 2021-06-23 10:38:06 +01:00
prune-images.yml Adds Docker image pruning command 2020-01-27 13:44:01 +03:00
site.yml Support enable/disable rabbitmq prometheus plugins 2022-01-09 09:50:00 +00:00