Merge "Retry rabbitmq password change"
This commit is contained in:
commit
f6c001faf6
@ -139,12 +139,18 @@ function restart_rpc_backend() {
|
|||||||
if is_service_enabled rabbit; then
|
if is_service_enabled rabbit; then
|
||||||
# Start rabbitmq-server
|
# Start rabbitmq-server
|
||||||
echo_summary "Starting RabbitMQ"
|
echo_summary "Starting RabbitMQ"
|
||||||
if is_fedora || is_suse; then
|
# NOTE(bnemec): Retry initial rabbitmq configuration to deal with
|
||||||
# service is not started by default
|
# the fact that sometimes it fails to start properly.
|
||||||
restart_service rabbitmq-server
|
# Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1059028
|
||||||
fi
|
for i in `seq 10`; do
|
||||||
# change the rabbit password since the default is "guest"
|
if is_fedora || is_suse; then
|
||||||
sudo rabbitmqctl change_password guest $RABBIT_PASSWORD
|
# service is not started by default
|
||||||
|
restart_service rabbitmq-server
|
||||||
|
fi
|
||||||
|
# change the rabbit password since the default is "guest"
|
||||||
|
sudo rabbitmqctl change_password guest $RABBIT_PASSWORD && break
|
||||||
|
[[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password"
|
||||||
|
done
|
||||||
if is_service_enabled n-cell; then
|
if is_service_enabled n-cell; then
|
||||||
# Add partitioned access for the child cell
|
# Add partitioned access for the child cell
|
||||||
if [ -z `sudo rabbitmqctl list_vhosts | grep child_cell` ]; then
|
if [ -z `sudo rabbitmqctl list_vhosts | grep child_cell` ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user