]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/standalone/test_ceph_daemon: Fix hang when CEPH_DAEMON is not set
authorThomas Bechtold <tbechtold@suse.com>
Wed, 6 Nov 2019 15:01:25 +0000 (16:01 +0100)
committerThomas Bechtold <tbechtold@suse.com>
Wed, 6 Nov 2019 15:09:55 +0000 (16:09 +0100)
When running test_ceph_daemon.sh from the root dir and not setting
$CEPH_DAEMON manually, the call hangs at:

$ ./qa/standalone/test_ceph_daemon.sh
[...]
+ for p in $PYTHONS
+ echo '=== re-running with python3 ==='
=== re-running with python3 ===
++ which python3
+ ln -s /usr/bin/python3 /tmp/tmp.6hneCsNMio/python
+ echo '#!/tmp/tmp.6hneCsNMio/python'
+ cat

Check that there is a ceph-daemon found before continue.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
qa/standalone/test_ceph_daemon.sh

index 1149db69fd0614f0e1a53d670ade621be2904b9f..18ad8cd590c2a4e93638dcbfc92ede17fd5a31c3 100755 (executable)
@@ -11,6 +11,12 @@ if [ -z "$CEPH_DAEMON" ]; then
     which ceph-daemon && CEPH_DAEMON=$(which ceph-daemon)
 fi
 
+# at this point, we need $CEPH_DAEMON set
+if [ -z "$CEPH_DAEMON" ]; then
+    echo "ceph-daemon not found.Please set \$CEPH_DAEMON"
+    exit 1
+fi
+
 # respawn ourselves with a shebang
 PYTHONS="python3 python2"  # which pythons we test
 if [ -z "$PYTHON_KLUDGE" ]; then