]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
orchestra/cluster: run parallel and wait
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Sat, 13 Nov 2021 11:47:28 +0000 (12:47 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 15 Nov 2021 21:04:10 +0000 (22:04 +0100)
commit007156bcbbdd138965682a782c12aae81d95d0e6
tree7bd8f25ebf087c2aa6ebe004a189e30a8c880525
parentd4737010a85099043cf081dc05b4069d301b23fb
orchestra/cluster: run parallel and wait

Make cluster.run able to execute command in parallel on all
nodes and wait for completion.

In order to run a command in parallel on all nodes of the
cluster, instead of combination:

  run.wait(cluster.run(wait=False, args=...))

this patch makes it possible to do the same just by:

  cluster.run(parallel=True, args=...)

the wait arguments defaults to True in this case.

Also the behavior of the method is not changed
when wait set to False (like in the first example),
so it is supposed to be backward compatible.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/orchestra/cluster.py