Skip to content

Commit b1f6c18

Browse files
author
Dean Troyer
committed
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
1 parent 185c66e commit b1f6c18

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

stack.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,10 +1182,12 @@ if is_service_enabled swift; then
11821182
# We then can start rsync.
11831183
sudo /etc/init.d/rsync restart || :
11841184

1185-
# With swift-init we are first spawning all the swift services but kill the
1185+
# First spawn all the swift services then kill the
11861186
# proxy service so we can run it in foreground in screen.
1187-
swift-init all restart
1188-
swift-init proxy stop
1187+
# ``swift-init ... {stop|restart}`` exits with '1' if no servers are running,
1188+
# ignore it just in case
1189+
swift-init all restart || true
1190+
swift-init proxy stop || true
11891191

11901192
unset s swift_hash swift_auth_server
11911193
fi

0 commit comments

Comments
 (0)