Skip to content

Commit

Permalink
Address RabbitMQ quorum PR nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Welsh committed Aug 20, 2024
1 parent 5c5afa4 commit 9cfefa6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion etc/kayobe/environments/ci-aio/kolla/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ opensearch_heap_size: 200m
# Increase Grafana timeout
grafana_start_first_node_retries: 20

# Ensure Rabbit is deployed with HA rather than Quorum queues (to test migrations)
# Ensure Rabbit is deployed with HA rather than quorum queues (to test migrations)
om_enable_rabbitmq_high_availability: true
om_enable_rabbitmq_quorum_queues: false
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
features:
- |
Added a script to automate RabbitMQ Quorum queue migrations.
Added a script to automate RabbitMQ quorum queue migrations.
10 changes: 5 additions & 5 deletions tools/rabbitmq-quorum-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ if [[ ! "$1" = "--skip-checks" ]]; then
exit 1
fi
kayobe overcloud service configuration generate --node-config-dir /tmp/rabbit-migration --kolla-tags none
# Fail if HA is set or Quorum is not
# Fail if HA is set or quorum is not
if ! grep 'om_enable_rabbitmq_quorum_queues: true' $KOLLA_CONFIG_PATH/globals.yml || grep 'om_enable_rabbitmq_high_availability: true' $KOLLA_CONFIG_PATH/globals.yml; then
echo "Failed precheck: om_enable_rabbitmq_quorum_queues must be enabled, om_enable_rabbitmq_high_availability must be disabled"
exit 1
fi
fi

# Generate new config, stop services using rabbit, and reset rabbit state
kayobe overcloud service configuration generate --node-config-dir /etc/kolla --kolla-skip-tags rabbitmq-ha-precheck &&
kayobe kolla ansible run "stop --yes-i-really-really-mean-it" -kt $RABBITMQ_SERVICES_TO_RESTART &&
kayobe overcloud service configuration generate --node-config-dir /etc/kolla --kolla-skip-tags rabbitmq-ha-precheck
kayobe kolla ansible run "stop --yes-i-really-really-mean-it" -kt $RABBITMQ_SERVICES_TO_RESTART
kayobe kolla ansible run rabbitmq-reset-state

if [[ ! "$1" = "--skip-checks" ]]; then
Expand All @@ -46,7 +46,7 @@ if [[ ! "$1" = "--skip-checks" ]]; then
fi
fi

# Redeploy with Quorum Queues enabled
# Redeploy with quorum queues enabled
kayobe kolla ansible run deploy-containers -kt $RABBITMQ_SERVICES_TO_RESTART

if [[ ! "$1" = "--skip-checks" ]]; then
Expand All @@ -55,6 +55,6 @@ if [[ ! "$1" = "--skip-checks" ]]; then
if kayobe overcloud host command run -l controllers -b --command "docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_queues type | grep quorum"; then
echo "Queues migrated successfully"
else
echo "Failed post-check: A controller does not have any Quorum queues"
echo "Failed post-check: A controller does not have any quorum queues"
fi
fi

0 comments on commit 9cfefa6

Please sign in to comment.