File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+
3
+ # This script is intended to be run in CI to test upgrades.
4
+ # It executes any preparation steps that must be perfomed before upgrading
5
+ # OpenStack services.
6
+
7
+ # NOTE(upgrade): This script is unique to each release. It may not be required
8
+ # for some releases.
9
+
10
+ set -ex
11
+
12
+ function prechecks() {
13
+ if [[ ! $KAYOBE_CONFIG_PATH ]]; then
14
+ echo " Environment variable \$ KAYOBE_CONFIG_PATH is not defined"
15
+ echo " Ensure your environment is set up to run kayobe commands"
16
+ exit 2
17
+ fi
18
+ }
19
+
20
+ function rabbit_migration() {
21
+ if kayobe overcloud host command run -l controllers -b --command " docker exec rabbitmq rabbitmqctl list_queues durable | grep false" ; then
22
+ # Set feature flaga, execute RabbitMQ queue migration script, unset feature flags (to avoid git conflicts)
23
+ KOLLA_GLOBALS_PATH=$KAYOBE_CONFIG_PATH /kolla/globals.yml
24
+ if [[ $KAYOBE_ENVIRONMENT ]]; then
25
+ KOLLA_GLOBALS_PATH=$KAYOBE_CONFIG_PATH /environments/$KAYOBE_ENVIRONMENT /kolla/globals.yml
26
+ fi
27
+ sed -i -e ' $aom_enable_queue_manager: True' \
28
+ -e ' $aom_enable_rabbitmq_quorum_queues: True' \
29
+ -e ' $aom_enable_rabbitmq_transient_quorum_queue: True' \
30
+ -e ' $aom_enable_rabbitmq_stream_fanout: True' \
31
+ $KOLLA_GLOBALS_PATH
32
+
33
+ $KAYOBE_CONFIG_PATH /../../tools/rabbitmq-queue-migration.sh
34
+
35
+ sed -i -e ' /om_enable_queue_manager: True/d' \
36
+ -e ' /om_enable_rabbitmq_quorum_queues: True/d' \
37
+ -e ' /om_enable_rabbitmq_transient_quorum_queue: True/d' \
38
+ -e ' /om_enable_rabbitmq_stream_fanout: True/d' \
39
+ $KOLLA_GLOBALS_PATH
40
+
41
+ fi
42
+ }
43
+
44
+ prechecks
45
+ rabbit_migration
You can’t perform that action at this time.
0 commit comments