teuthology-kill [-a ARCHIVE] [-p] -r RUN
teuthology-kill [-a ARCHIVE] [-p] -m MACHINE_TYPE -r RUN
teuthology-kill [-a ARCHIVE] -r RUN -j JOB ...
+ teuthology-kill [-a ARCHIVE] -J JOBSPEC
teuthology-kill [-p] -o OWNER -m MACHINE_TYPE -r RUN
Kill running teuthology jobs:
-p, --preserve-queue Preserve the queue - do not delete queued jobs
-r, --run RUN The name(s) of the run(s) to kill
-j, --job JOB The job_id of the job to kill
+ -J, --jobspec JOBSPEC
+ The 'jobspec' of the job to kill. A jobspec consists of
+ both the name of the run and the job_id, separated by a
+ '/'. e.g. 'my-test-run/1234'
-o, --owner OWNER The owner of the job(s)
-m, --machine_type MACHINE_TYPE
The type of machine the job(s) are running on.
def main(args):
run_name = args['--run']
job = args['--job']
+ jobspec = args['--jobspec']
archive_base = args['--archive']
owner = args['--owner']
machine_type = args['--machine_type']
preserve_queue = args['--preserve-queue']
+ if jobspec:
+ split_spec = jobspec.split('/')
+ run_name = split_spec[0]
+ job = [split_spec[1]]
+
if job:
for job_id in job:
kill_job(run_name, job_id, archive_base, owner, machine_type)