diff --git a/lib/rpc_backend b/lib/rpc_backend index 297ebacc08..33ab03d664 100644 --- a/lib/rpc_backend +++ b/lib/rpc_backend @@ -194,13 +194,22 @@ function restart_rpc_backend { # NOTE(bnemec): Retry initial rabbitmq configuration to deal with # the fact that sometimes it fails to start properly. # Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1144100 + # NOTE(tonyb): Extend the orginal retry logic to only restart rabbitmq + # every second time around the loop. + # See: https://bugs.launchpad.net/devstack/+bug/1449056 for details on + # why this is needed. This can bee seen on vivid and Debian unstable + # (May 2015) + # TODO(tonyb): Remove this when Debian and Ubuntu have a fixed systemd + # service file. local i - for i in `seq 10`; do + for i in `seq 20`; do local rc=0 - [[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password" + [[ $i -eq "20" ]] && die $LINENO "Failed to set rabbitmq password" - restart_service rabbitmq-server + if [[ $(( i % 2 )) == "0" ]] ; then + restart_service rabbitmq-server + fi rabbit_setuser "$RABBIT_USERID" "$RABBIT_PASSWORD" || rc=$? if [ $rc -ne 0 ]; then