Skip to content

Commit

Permalink
Add conditional choice of kolla/globals.yml path
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghun1ee committed Nov 1, 2024
1 parent 67f0a69 commit 4cd6277
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/upgrade-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@ function rabbit_upgrade() {
function rabbit_migration() {
if ! kayobe overcloud host command run -l controllers -b --command "docker exec rabbitmq rabbitmqctl list_queues type | grep quorum"; then
# Set quorum flag, execute RabbitMQ queue migration script, unset quorum flag (to avoid git conflicts)
KOLLA_GLOBALS_PATH=$KAYOBE_CONFIG_PATH/kolla/globals.yml
if [[ $KAYOBE_ENVIRONMENT ]]; then
KOLLA_GLOBALS_PATH=$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/kolla/globals.yml
fi
sed -i -e 's/om_enable_rabbitmq_high_availability: true/om_enable_rabbitmq_high_availability: false/' \
-e 's/om_enable_rabbitmq_quorum_queues: false/om_enable_rabbitmq_quorum_queues: true/' \
$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/kolla/globals.yml
$KOLLA_GLOBALS_PATH

$KAYOBE_CONFIG_PATH/../../tools/rabbitmq-quorum-migration.sh

sed -i -e 's/om_enable_rabbitmq_high_availability: false/om_enable_rabbitmq_high_availability: true/' \
-e 's/om_enable_rabbitmq_quorum_queues: true/om_enable_rabbitmq_quorum_queues: false/' \
$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/kolla/globals.yml
$KOLLA_GLOBALS_PATH
fi
}

Expand Down

0 comments on commit 4cd6277

Please sign in to comment.