13
13
14
14
if [[ ! " $1 " = " --skip-checks" ]]; then
15
15
# Fail if clocks are not synced
16
- if ! kayobe overcloud host command run -l controllers -b --command " timedatectl status | grep 'synchronized: yes'" ; then
16
+ if ! ( kayobe overcloud host command run -l controllers -b --command " timedatectl status | grep 'synchronized: yes'" ) ; then
17
17
echo " Failed precheck: Time not synced on controllers"
18
18
echo " Use 'timedatectl status' to check sync state"
19
19
echo " Either wait for sync or use 'chronyc makestep'"
20
20
exit 1
21
21
fi
22
22
kayobe overcloud service configuration generate --node-config-dir /tmp/rabbit-migration --kolla-tags none
23
23
# Fail if HA is set or quorum is not
24
- 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
24
+ 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
25
25
echo " Failed precheck: om_enable_rabbitmq_quorum_queues must be enabled, om_enable_rabbitmq_high_availability must be disabled"
26
26
exit 1
27
27
fi
@@ -35,12 +35,12 @@ kayobe kolla ansible run rabbitmq-reset-state
35
35
if [[ ! " $1 " = " --skip-checks" ]]; then
36
36
# Fail if any queues still exist
37
37
sleep 20
38
- if kayobe overcloud host command run -l controllers -b --command " docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_queues name --silent | grep -v '^$'" ; then
38
+ if ( kayobe overcloud host command run -l controllers -b --command " docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_queues name --silent | grep -v '^$'" ) ; then
39
39
echo " Failed check: RabbitMQ has not stopped properly, queues still exist"
40
40
exit 1
41
41
fi
42
42
# Fail if any exchanges still exist (excluding those starting with 'amq.')
43
- if kayobe overcloud host command run -l controllers -b --command " docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_exchanges name --silent | grep -v '^$' | grep -v '^amq.'" ; then
43
+ if ( kayobe overcloud host command run -l controllers -b --command " docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_exchanges name --silent | grep -v '^$' | grep -v '^amq.'" ) ; then
44
44
echo " Failed check: RabbitMQ has not stopped properly, exchanges still exist"
45
45
exit 1
46
46
fi
@@ -52,7 +52,7 @@ kayobe kolla ansible run deploy-containers -kt $RABBITMQ_SERVICES_TO_RESTART
52
52
if [[ ! " $1 " = " --skip-checks" ]]; then
53
53
sleep 20
54
54
# Assert that at least one quorum queue exists on each controller
55
- if kayobe overcloud host command run -l controllers -b --command " docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_queues type | grep quorum" ; then
55
+ if ( kayobe overcloud host command run -l controllers -b --command " docker exec $RABBITMQ_CONTAINER_NAME rabbitmqctl list_queues type | grep quorum" ) ; then
56
56
echo " Queues migrated successfully"
57
57
else
58
58
echo " Failed post-check: A controller does not have any quorum queues"
0 commit comments