Skip to content

Commit 49d0ec2

Browse files
jovialseunghun1ee
authored andcommitted
Update echo commands to use -e for escape sequences
Fix colored output on errors. It is quite easy to miss the failures otherwise. Co-authored-by: pescobar.it@gmail.com
1 parent ae4d58c commit 49d0ec2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tools/rabbitmq-queue-migration.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ RABBITMQ_SERVICES_TO_RESTART=barbican,blazar,cinder,cloudkitty,designate,heat,ir
99
RABBITMQ_CONTAINER_NAME=rabbitmq
1010

1111
if [[ ! $KAYOBE_CONFIG_PATH ]]; then
12-
echo "${RED}Environment variable \$KAYOBE_CONFIG_PATH is not defined"
13-
echo "${RED}Ensure your environment is set up to run kayobe commands"
12+
echo -e "${RED}Environment variable \$KAYOBE_CONFIG_PATH is not defined"
13+
echo -e "${RED}Ensure your environment is set up to run kayobe commands"
1414
exit 2
1515
fi
1616

1717
if [[ ! "$1" = "--skip-checks" ]]; then
1818
# Fail if clocks are not synced
1919
if ! ( kayobe overcloud host command run -l controllers -b --command "timedatectl status | grep 'synchronized: yes'" ); then
20-
echo "${RED}Failed precheck: Time not synced on controllers"
21-
echo "${RED}Use 'timedatectl status' to check sync state"
22-
echo "${RED}Either wait for sync or use 'chronyc makestep'"
20+
echo -e "${RED}Failed precheck: Time not synced on controllers"
21+
echo -e "${RED}Use 'timedatectl status' to check sync state"
22+
echo -e "${RED}Either wait for sync or use 'chronyc makestep'"
2323
exit 1
2424
fi
2525
kayobe overcloud service configuration generate --node-config-dir /tmp/rabbit-migration --kolla-tags none
@@ -28,7 +28,7 @@ if [[ ! "$1" = "--skip-checks" ]]; then
2828
grep 'om_enable_rabbitmq_quorum_queues: true' $KOLLA_CONFIG_PATH/globals.yml && \
2929
grep 'om_enable_rabbitmq_transient_quorum_queue: true' $KOLLA_CONFIG_PATH/globals.yml && \
3030
grep 'om_enable_rabbitmq_stream_fanout: true' $KOLLA_CONFIG_PATH/globals.yml ); then
31-
echo "${RED}Failed precheck: The following must be enabled: om_enable_queue_manager, om_enable_rabbitmq_quorum_queues, om_enable_rabbitmq_transient_quorum_queue, om_enable_rabbitmq_stream_fanout"
31+
echo -e "${RED}Failed precheck: The following must be enabled: om_enable_queue_manager, om_enable_rabbitmq_quorum_queues, om_enable_rabbitmq_transient_quorum_queue, om_enable_rabbitmq_stream_fanout"
3232
exit 1
3333
fi
3434
fi

0 commit comments

Comments
 (0)