Fix swift restart error
'swift-init all {restart|stop}' exits with '1' if there are any problems
sutting down any swift server, including if they were not running to begin with.
An attempt to address this has already been ignored by the Swift team, and it
would not have completely eliminated the problem, so we'll just be defensive here.
Change-Id: Ib8e30221e1c8873d0e849add89dc87d5ccda9d82
diff --git a/stack.sh b/stack.sh
index 27173a1..68b430e 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1182,10 +1182,12 @@
# We then can start rsync.
sudo /etc/init.d/rsync restart || :
- # With swift-init we are first spawning all the swift services but kill the
+ # First spawn all the swift services then kill the
# proxy service so we can run it in foreground in screen.
- swift-init all restart
- swift-init proxy stop
+ # ``swift-init ... {stop|restart}`` exits with '1' if no servers are running,
+ # ignore it just in case
+ swift-init all restart || true
+ swift-init proxy stop || true
unset s swift_hash swift_auth_server
fi