Avoid CIBT jobs failing on lavacli wait call 84/24784/3
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 17 Jun 2020 10:45:26 +0000 (12:45 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 17 Jun 2020 10:45:36 +0000 (12:45 +0200)
Lavacli wait has a bug and returns
Submitted.

Running......................................................
  Unable to call 'jobs.wait': [Errno 2] No such file or directory

Avoid this failing the job as the following evaluation will still work.

Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: If8fa942b7ddc49857d2f010f02ae3f53d01476ac

jjb/common/include-agl-lava-jobs-submit.sh

index a94b25b..912487d 100644 (file)
@@ -13,7 +13,7 @@ fi
 
 if [ ! -e $JOB_FILE ]; then
     echo "ERROR: LAVA job file $JOB_FILE not present."
-    exit 1
+    exit 123
 fi
 JOB_BASE=$(basename $JOB_FILE .yaml)
 
@@ -34,7 +34,7 @@ fi
 job_id=$(lavacli -i $lab jobs submit $JOB_FILE_NEW)
 if [ $? -ne 0 ]; then
        echo "ERROR: job submission error"
-       exit 1
+       exit 123
 fi
 # Printing the job URL in the log
 echo "THe job id is: ${job_id}"
@@ -48,7 +48,7 @@ echo "####################################################"
 echo ""
 
 # use lavacli wait job instead of the polling.
-lavacli -i $lab jobs wait $job_id --timeout 7200
+lavacli -i $lab jobs wait $job_id --timeout 7200 || true
 lavacli -i $lab jobs show $job_id --yaml > $JOB_STATUS
 state=$(grep ^state: $JOB_STATUS| cut -d' ' -f2)
 if [ "$state" == "Finished" ]; then
@@ -190,6 +190,6 @@ set +x
 if [ x"$status" = x"Complete" ]; then
     exit 0
 fi
-#exit 1
+#exit 123
 # for now do not fail
 exit 0