|
...
|
...
|
@@ -194,13 +194,22 @@ function restart_rpc_backend {
|
|
194
|
194
|
# NOTE(bnemec): Retry initial rabbitmq configuration to deal with
|
|
195
|
195
|
# the fact that sometimes it fails to start properly.
|
|
196
|
196
|
# Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1144100
|
|
|
197
|
+ # NOTE(tonyb): Extend the orginal retry logic to only restart rabbitmq
|
|
|
198
|
+ # every second time around the loop.
|
|
|
199
|
+ # See: https://bugs.launchpad.net/devstack/+bug/1449056 for details on
|
|
|
200
|
+ # why this is needed. This can bee seen on vivid and Debian unstable
|
|
|
201
|
+ # (May 2015)
|
|
|
202
|
+ # TODO(tonyb): Remove this when Debian and Ubuntu have a fixed systemd
|
|
|
203
|
+ # service file.
|
|
197
|
204
|
local i
|
|
198
|
|
- for i in `seq 10`; do
|
|
|
205
|
+ for i in `seq 20`; do
|
|
199
|
206
|
local rc=0
|
|
200
|
207
|
|
|
201
|
|
- [[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password"
|
|
|
208
|
+ [[ $i -eq "20" ]] && die $LINENO "Failed to set rabbitmq password"
|
|
202
|
209
|
|
|
203
|
|
- restart_service rabbitmq-server
|
|
|
210
|
+ if [[ $(( i % 2 )) == "0" ]] ; then
|
|
|
211
|
+ restart_service rabbitmq-server
|
|
|
212
|
+ fi
|
|
204
|
213
|
|
|
205
|
214
|
rabbit_setuser "$RABBIT_USERID" "$RABBIT_PASSWORD" || rc=$?
|
|
206
|
215
|
if [ $rc -ne 0 ]; then
|