mirror of
https://github.com/ceph/ceph
synced 2025-04-09 19:26:08 +00:00
Be more informative if owner info is missing
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
parent
edfeffe3dd
commit
293c2bd49c
@ -7,8 +7,8 @@ doc = """
|
||||
usage: teuthology-kill -h
|
||||
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 [-a ARCHIVE] [-o OWNER] -r RUN -j JOB ...
|
||||
teuthology-kill [-a ARCHIVE] [-o OWNER] -J JOBSPEC
|
||||
teuthology-kill [-p] -o OWNER -m MACHINE_TYPE -r RUN
|
||||
|
||||
Kill running teuthology jobs:
|
||||
|
@ -64,6 +64,10 @@ def kill_job(run_name, job_id, archive_base=None, owner=None,
|
||||
machine_type=None):
|
||||
serializer = report.ResultsSerializer(archive_base)
|
||||
job_info = serializer.job_info(run_name, job_id)
|
||||
if not owner and 'owner' not in job_info:
|
||||
raise RuntimeError(
|
||||
"I could not figure out the owner of the requested job. "
|
||||
"Please pass --owner <owner>.")
|
||||
owner = job_info['owner']
|
||||
kill_processes(run_name, [job_info.get('pid')])
|
||||
targets = dict(targets=job_info.get('targets', {}))
|
||||
|
Loading…
Reference in New Issue
Block a user