diff options
Diffstat (limited to 'apps/files_external/tests/env/start-amazons3-ceph.sh')
-rwxr-xr-x | apps/files_external/tests/env/start-amazons3-ceph.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/files_external/tests/env/start-amazons3-ceph.sh b/apps/files_external/tests/env/start-amazons3-ceph.sh index 3b4a15da92a..b40d28f1ec6 100755 --- a/apps/files_external/tests/env/start-amazons3-ceph.sh +++ b/apps/files_external/tests/env/start-amazons3-ceph.sh @@ -49,9 +49,21 @@ echo "${docker_image} container: $container" # put container IDs into a file to drop them after the test run (keep in mind that multiple tests run in parallel on the same host) echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.amazons3 -# TODO find a way to determine the successful initialization inside the docker container -echo "Waiting 20 seconds for ceph initialization ... " -sleep 20 +echo -n "Waiting for ceph initialization" +starttime=$(date +%s) +# support for GNU netcat and BSD netcat +while ! (nc -c -w 1 ${host} ${port} </dev/null >&/dev/null \ + || nc -w 1 ${host} ${port} </dev/null >&/dev/null); do + sleep 1 + echo -n '.' + if (( $(date +%s) > starttime + 60 )); then + echo + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 + fi +done +echo +sleep 1 echo "Create ceph user" docker exec $container radosgw-admin user create \ |