feat(rabbitmq): upgrade to RabbitMQ 4.2 (#4558)
Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
This commit is contained in:
1 parent
640b380525
commit
dfac303fd2
5 files changed
+56
-1
No files matched your search
@@ -59,12 +59,16 @@ resources, replicas, persistence, and additional configuration.
|
||||
rabbitmq:
|
||||
additionalConfig: |
|
||||
deprecated_features.permit.management_metrics_collection = true
|
||||
deprecated_features.permit.transient_nonexcl_queues = true
|
||||
vm_memory_high_watermark.relative = 0.9
|
||||
|
||||
.. note::
|
||||
|
||||
Setting ``rabbitmq.additionalConfig`` replaces the default value (it's not
|
||||
appended). If you override it, include any defaults you still want applied.
|
||||
Keep ``deprecated_features.permit.transient_nonexcl_queues = true`` in
|
||||
any override, since the OpenStack services need it and RabbitMQ 4.3 and
|
||||
later reject their reply and fanout queues without it.
|
||||
|
||||
*****************************
|
||||
Skipping spec diff approval
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
RabbitMQ is upgraded from 4.1.4 to 4.2.9. RabbitMQ 4.3 and later can only
|
||||
be reached from 4.2, so this release must be deployed before upgrading to
|
||||
the next major release. The deployment now stops before changing a
|
||||
RabbitMQ cluster that cannot be upgraded directly to the new version.
|
||||
- |
|
||||
RabbitMQ now explicitly permits non-durable, non-exclusive queues, which
|
||||
the OpenStack services use for replies and fanout. RabbitMQ 4.3 denies
|
||||
them by default and needs the setting on every node before upgrading. If
|
||||
you override ``rabbitmq.additionalConfig``, add
|
||||
``deprecated_features.permit.transient_nonexcl_queues = true`` to it.
|
||||
@@ -234,10 +234,14 @@ _atmosphere_images:
|
||||
prometheus_operator: "{{ atmosphere_image_prefix }}quay.io/prometheus-operator/prometheus-operator:v0.74.0"
|
||||
prometheus_pushgateway: "{{ atmosphere_image_prefix }}docker.io/prom/pushgateway:v1.8.0"
|
||||
prometheus: "{{ atmosphere_image_prefix }}quay.io/prometheus/prometheus:v2.51.2"
|
||||
# NOTE: The rabbit-init job of the vendored helm-toolkit only supports the
|
||||
# rabbitmqadmin v1 command line, which the RabbitMQ images replaced
|
||||
# with v2 after 4.1.4. It talks to the management HTTP API, so it
|
||||
# works with newer servers.
|
||||
rabbit_init: "{{ atmosphere_image_prefix }}docker.io/library/rabbitmq:4.1.4-management"
|
||||
rabbitmq_cluster_operator: "{{ atmosphere_image_prefix }}docker.io/rabbitmqoperator/cluster-operator:2.16.1"
|
||||
rabbitmq_credential_updater: "{{ atmosphere_image_prefix }}docker.io/rabbitmqoperator/default-user-credential-updater:1.0.8"
|
||||
rabbitmq_server: "{{ atmosphere_image_prefix }}docker.io/library/rabbitmq:4.1.4-management"
|
||||
rabbitmq_server: "{{ atmosphere_image_prefix }}docker.io/library/rabbitmq:4.2.9-management"
|
||||
rabbitmq_topology_operator: "{{ atmosphere_image_prefix }}docker.io/rabbitmqoperator/messaging-topology-operator:1.17.4"
|
||||
redis_exporter: "{{ atmosphere_image_prefix }}docker.io/bitnamilegacy/redis-exporter:1.67.0-debian-12-r9"
|
||||
rook_ceph: "{{ atmosphere_image_prefix }}docker.io/rook/ceph:v1.15.9"
|
||||
|
||||
@@ -20,6 +20,20 @@
|
||||
namespace: openstack
|
||||
register: _rabbitmq_cluster
|
||||
|
||||
- name: Assert that the RabbitMQ cluster can be upgraded directly
|
||||
when:
|
||||
- _rabbitmq_cluster.resources | length > 0
|
||||
- _rabbitmq_current_series | length > 0
|
||||
- _rabbitmq_target_series | length > 0
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- _rabbitmq_current_series in _rabbitmq_upgrade_paths.get(_rabbitmq_target_series, [_rabbitmq_target_series])
|
||||
fail_msg: >-
|
||||
The RabbitMQ cluster "rabbitmq-{{ rabbitmq_cluster_name }}" runs RabbitMQ {{ _rabbitmq_current_series }},
|
||||
which cannot be upgraded directly to RabbitMQ {{ _rabbitmq_target_series }}. Upgrade to the previous
|
||||
Atmosphere release first.
|
||||
quiet: true
|
||||
|
||||
- name: Wait for confirmation if RabbitMQ cluster spec doesn't match
|
||||
when:
|
||||
- not rabbitmq_skip_spec_diff | bool
|
||||
|
||||
@@ -30,6 +30,7 @@ _rabbitmq_spec:
|
||||
rabbitmq:
|
||||
additionalConfig: |
|
||||
deprecated_features.permit.management_metrics_collection = true
|
||||
deprecated_features.permit.transient_nonexcl_queues = true
|
||||
vm_memory_high_watermark.relative = 0.9
|
||||
replicas: 1
|
||||
resources:
|
||||
@@ -44,3 +45,22 @@ _rabbitmq_spec:
|
||||
type: ClusterIP
|
||||
terminationGracePeriodSeconds: 15
|
||||
tls: {}
|
||||
|
||||
# NOTE: RabbitMQ only supports rolling upgrades between specific release
|
||||
# series (https://www.rabbitmq.com/docs/upgrade). Each key is a target
|
||||
# series and lists the series that a running cluster can upgrade from.
|
||||
_rabbitmq_upgrade_paths:
|
||||
"4.2": ["3.13", "4.0", "4.1", "4.2"]
|
||||
"4.3": ["4.2", "4.3"]
|
||||
"4.4": ["4.2", "4.3", "4.4"]
|
||||
|
||||
# NOTE: Release series (for example "4.2") of the running cluster and of the
|
||||
# image it is being deployed with, empty when the tag has no version.
|
||||
_rabbitmq_series_regex: '^[0-9]+\.[0-9]+'
|
||||
_rabbitmq_current_series: >-
|
||||
{{ (_rabbitmq_cluster.resources[0].spec.image | vexxhost.kubernetes.docker_image('tag')
|
||||
| regex_search(_rabbitmq_series_regex) | default('', true))
|
||||
if _rabbitmq_cluster.resources | default([]) | length > 0 else '' }}
|
||||
_rabbitmq_target_series: >-
|
||||
{{ (_rabbitmq_spec | combine(rabbitmq_spec, recursive=True)).image | vexxhost.kubernetes.docker_image('tag')
|
||||
| regex_search(_rabbitmq_series_regex) | default('', true) }}
|
||||
Reference in new issue
Block a user