Commit b4e68848 authored by Iustin Pop's avatar Iustin Pop
Browse files

gnt-instance: fix GenericManyOps



Currently, GenericManyOps ignores the actual success or failure results
from the invididual jobs. We change this to return '0' (i.e. success)
only when all jobs failed, as many times we have just one job.

Together with the JobExecutor change, this will report failures
correctly when used with a drained queue and submit only, or when used
normally and the opcode actually fails.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 53a8a54d
......@@ -227,8 +227,9 @@ def GenericManyOps(operation, fn):
for name in inames:
op = fn(name, opts)
jex.QueueJob(name, op)
jex.WaitOrShow(not opts.submit_only)
return 0
results = jex.WaitOrShow(not opts.submit_only)
rcode = compat.all(row[0] for row in results)
return int(not rcode)
return realfn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment