diff --git a/apps/files_external/tests/env/start-amazons3-ceph.sh b/apps/files_external/tests/env/start-amazons3-ceph.sh index 20fa7e7bb2..d36980fdd1 100755 --- a/apps/files_external/tests/env/start-amazons3-ceph.sh +++ b/apps/files_external/tests/env/start-amazons3-ceph.sh @@ -31,6 +31,10 @@ if [ -z "$thisFolder" ]; then thisFolder="." fi; +# create readiness notification socket +notify_sock=$(readlink -f "$thisFolder"/dockerContainerCeph.$EXECUTOR_NUMBER.amazons3.sock) +mkfifo "$notify_sock" + user=test accesskey=aaabbbccc secretkey=cccbbbaaa @@ -39,6 +43,7 @@ port=80 container=`docker run -d \ -e RGW_CIVETWEB_PORT=$port \ + -v "$notify_sock":/run/notifyme.sock \ ${docker_image}` host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container` @@ -50,7 +55,8 @@ echo "${docker_image} container: $container" echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.amazons3 echo -n "Waiting for ceph initialization" -if ! "$thisFolder"/env/wait-for-connection ${host} ${port} 60; then +ready=$(timeout 60 cat "$notify_sock") +if [[ $ready != 'READY=1' ]]; then echo "[ERROR] Waited 60 seconds, no response" >&2 exit 1 fi diff --git a/apps/files_external/tests/env/start-swift-ceph.sh b/apps/files_external/tests/env/start-swift-ceph.sh index 123f6b6871..357512ae4d 100755 --- a/apps/files_external/tests/env/start-swift-ceph.sh +++ b/apps/files_external/tests/env/start-swift-ceph.sh @@ -31,6 +31,10 @@ if [ -z "$thisFolder" ]; then thisFolder="." fi; +# create readiness notification socket +notify_sock=$(readlink -f "$thisFolder"/dockerContainerCeph.$EXECUTOR_NUMBER.swift.sock) +mkfifo "$notify_sock" + port=5001 user=test @@ -48,6 +52,7 @@ container=`docker run -d \ -e KEYSTONE_SERVICE=${service} \ -e OSD_SIZE=300 \ --privileged \ + -v "$notify_sock":/run/notifyme.sock \ ${docker_image}` host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container` @@ -59,7 +64,8 @@ echo "${docker_image} container: $container" echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift echo -n "Waiting for ceph initialization" -if ! "$thisFolder"/env/wait-for-connection ${host} 80 600; then +ready=$(timeout 600 cat "$notify_sock") +if [[ $ready != 'READY=1' ]]; then echo "[ERROR] Waited 600 seconds, no response" >&2 docker logs $container exit 1 diff --git a/apps/files_external/tests/env/stop-amazons3-ceph.sh b/apps/files_external/tests/env/stop-amazons3-ceph.sh index 3f56a6f1e5..dcf30d8c51 100755 --- a/apps/files_external/tests/env/stop-amazons3-ceph.sh +++ b/apps/files_external/tests/env/stop-amazons3-ceph.sh @@ -33,4 +33,5 @@ done; # cleanup rm $thisFolder/config.amazons3.php rm $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.amazons3 +rm $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.amazons3.sock diff --git a/apps/files_external/tests/env/stop-swift-ceph.sh b/apps/files_external/tests/env/stop-swift-ceph.sh index b1cbe94b48..9f15fb05a7 100755 --- a/apps/files_external/tests/env/stop-swift-ceph.sh +++ b/apps/files_external/tests/env/stop-swift-ceph.sh @@ -35,4 +35,5 @@ done; # cleanup rm $thisFolder/config.swift.php rm $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift +rm $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift.sock