Otherwise, we've seen intermittent "Unable to establish connection"
failures, with the main devstack log reporting things like
2017-07-19 13:54:29.973 -> start proxy service
2017-07-19 13:54:30.082 -> start OSC to store temp url key
2017-07-19 13:54:31.908 -> OSC reports failure
Meanwhile, the s-proxy screen session tells us things like
Jul 19 13:54:31.919988 -> start child worker
Jul 19 13:54:32.206598 -> still loading the WSGI app
... and ports aren't actually bound until *after* the app is loaded.
Add a wait_for_service call to wait for the proxy to come up.
Change-Id: I1a722de31b144797230991700e110353a2d937dd
| ... | ... |
@@ -846,6 +846,14 @@ function start_swift {
|
| 846 | 846 |
fi |
| 847 | 847 |
run_process s-proxy "$SWIFT_BIN_DIR/swift-proxy-server ${SWIFT_CONF_DIR}/proxy-server.conf -v"
|
| 848 | 848 |
|
| 849 |
+ # We also started the storage services, but proxy started last and |
|
| 850 |
+ # will take the longest to start, so by the time it comes up, we're |
|
| 851 |
+ # probably fine. |
|
| 852 |
+ echo "Waiting for swift proxy to start..." |
|
| 853 |
+ if ! wait_for_service $SERVICE_TIMEOUT $SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/info; then |
|
| 854 |
+ die $LINENO "swift proxy did not start" |
|
| 855 |
+ fi |
|
| 856 |
+ |
|
| 849 | 857 |
if [[ "$SWIFT_ENABLE_TEMPURLS" == "True" ]]; then |
| 850 | 858 |
swift_configure_tempurls |
| 851 | 859 |
fi |