Overwrite run_cmd timeout in wait_for_run
authorSamir Aguiar <samirjaguiar@gmail.com>
Fri, 14 Dec 2018 18:27:06 +0000 (16:27 -0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 7 Feb 2019 15:50:39 +0000 (16:50 +0100)
The default timeout of 60 seconds might not be enough

src/arnied_wrapper.py

index d871bb5..2f279a4 100644 (file)
@@ -381,7 +381,8 @@ def wait_for_run(program, timeout=300, retries=10, vm=None):
             log.warning("The program %s was not scheduled and is not running", program)
     cmd = "/usr/intranator/bin/arnied_helper --wait-for-program-end " \
         + program.upper() + " --wait-for-program-timeout " + str(timeout)
-    result = run_cmd(cmd=cmd, vm=vm)
+    # add one second to make sure arnied_helper is finished when we expire
+    result = run_cmd(cmd=cmd, vm=vm, timeout=timeout+1)
     log.debug(result.stdout)