]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
docs/docker-compose: Ensure we actually schedule
authorZack Cerza <zack@redhat.com>
Fri, 22 Jul 2022 17:51:19 +0000 (11:51 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 22 Jul 2022 18:15:59 +0000 (12:15 -0600)
This should have failed: https://github.com/ceph/teuthology/pull/1776/checks

Signed-off-by: Zack Cerza <zack@redhat.com>
docs/docker-compose/start.sh
docs/docker-compose/teuthology/teuthology.sh

index b5baec7370b5a3b7f8719eaed92872136d538f66..871258c5beb81c4e9f4df42d6a6abaf02e583f68 100755 (executable)
@@ -41,9 +41,8 @@ if [ -z "$TEUTHOLOGY_WAIT" ]; then
 fi
 export TEUTHOLOGY_WAIT
 
-set +e
 trap "docker-compose down" SIGINT
 docker-compose up \
     --build \
     $DC_EXIT_FLAG
-$DC_AUTO_DOWN_CMD
\ No newline at end of file
+$DC_AUTO_DOWN_CMD
index 85029b975ba4fa0dafe9e07d26a49dfa0cec4e7e..bb5890331014780c9c7f8027c039efeba3abd0bc 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/bash
+set -e
 # We don't want -x yet, in case the private key is sensitive
 if [ -n "$SSH_PRIVKEY_FILE" ]; then
     echo "$SSH_PRIVKEY" > $HOME/.ssh/$SSH_PRIVKEY_FILE
@@ -33,8 +34,10 @@ if [ -z "$TEUTHOLOGY_WAIT" ]; then
         --force-priority \
         $CUSTOM_CONF
     DISPATCHER_EXIT_FLAG='--exit-on-empty-queue'
+    teuthology-queue -m $MACHINE_TYPE -s | \
+      python3 -c "import sys, json; assert json.loads(sys.stdin.read())['count'] > 0, 'queue is empty!'"
 fi
 teuthology-dispatcher -v \
     --log-dir /teuthology/log \
     --tube $MACHINE_TYPE \
-    $DISPATCHER_EXIT_FLAG
\ No newline at end of file
+    $DISPATCHER_EXIT_FLAG