From: Shraddha Agrawal Date: Tue, 25 Aug 2020 18:08:09 +0000 (+0530) Subject: fixes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=779506240e89bf0ab0091c0419724fabc7aceea2;p=teuthology.git fixes Signed-off-by: Shraddha Agrawal --- diff --git a/docs/commands/teuthology-dispatcher.rst b/docs/commands/teuthology-dispatcher.rst new file mode 100644 index 000000000..787ba86e7 --- /dev/null +++ b/docs/commands/teuthology-dispatcher.rst @@ -0,0 +1,4 @@ +teuthology-dispatcher +=============== + +.. program-output:: teuthology-dispatcher --help \ No newline at end of file diff --git a/scripts/dispatcher.py b/scripts/dispatcher.py index db2463696..5c65d8a40 100644 --- a/scripts/dispatcher.py +++ b/scripts/dispatcher.py @@ -1,7 +1,7 @@ """ usage: teuthology-dispatcher --help - teuthology-dispatcher --supervisor [-v] --bin-path BIN_PATH --job-config COFNFIG --archive-dir ARC_DIR - teuthology-dispatcher [-v] --archive-dir ARC_DIR --log-dir LOG_DIR --tube TUBE + teuthology-dispatcher --supervisor [-v] --bin-path BIN_PATH --job-config COFNFIG --archive-dir DIR + teuthology-dispatcher [-v] --archive-dir DIR --log-dir LOG_DIR --tube TUBE Start a dispatcher for the specified tube. Grab jobs from a beanstalk queue and run the teuthology tests they describe as subprocesses. The @@ -17,10 +17,10 @@ standard arguments: -v, --verbose be more verbose -t, --tube TUBE which beanstalk tube to read jobs from -l, --log-dir LOG_DIR path in which to store logs - --archive-dir ARC_DIR path to archive results in - --supervisor run dispactcher in job supervisor mode + -a DIR, --archive-dir DIR path to archive results in + --supervisor run dispatcher in job supervisor mode --bin-path BIN_PATH teuthology bin path - --job-config CONFIG file descriptor of job's config file + --job-config CONFIG file descriptor of job's config file """ import docopt diff --git a/teuthology/misc.py b/teuthology/misc.py index 6593d8c1a..77f9fe3e6 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -1349,10 +1349,10 @@ def archive_logs(ctx, remote_path, log_path): remote_path dir to job's archive dir under log_path dir. """ path = os.path.join(ctx.archive, 'remote') - os.mkdirs(path, exist_ok=True) + os.makedirs(path, exist_ok=True) for remote in ctx.cluster.remotes.keys(): sub = os.path.join(path, remote.shortname) - os.mkdirs(sub, exist_ok=True) + os.makedirs(sub, exist_ok=True) try: pull_directory(remote, remote_path, os.path.join(sub, log_path)) except ReadError: @@ -1366,22 +1366,8 @@ def compress_logs(ctx, remote_dir): log.info('Compressing logs...') run.wait( ctx.cluster.run( - args=[ - 'sudo', - 'find', - remote_dir, - '-name', - '*.log', - '-print0', - run.Raw('|'), - 'sudo', - 'xargs', - '-0', - '--no-run-if-empty', - '--', - 'gzip', - '--', - ], + args=(f"sudo find {remote_dir} -name *.log -print0 | " + f"sudo xargs -0 --no-run-if-empty -- gzip --"), wait=False, ), )