From: David Galloway Date: Sat, 26 Sep 2020 23:04:56 +0000 (-0400) Subject: kill.py: Allow deleting runs where bootstrap is failing X-Git-Tag: 1.2.0~258^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=beec8f4e02102d456171f1852e180e271724e6fa;p=teuthology.git kill.py: Allow deleting runs where bootstrap is failing ` looks like because bootstrapping failed, the teuthology-kill was not able to find machine_type and owner from the run archive directory, the directory has been created but no actual job started somehow` Signed-off-by: David Galloway --- diff --git a/teuthology/kill.py b/teuthology/kill.py index 872883347..1db4530fd 100755 --- a/teuthology/kill.py +++ b/teuthology/kill.py @@ -47,8 +47,13 @@ def kill_run(run_name, archive_base=None, owner=None, machine_type=None, run_archive_dir = os.path.join(archive_base, run_name) if os.path.isdir(run_archive_dir): run_info = find_run_info(serializer, run_name) - machine_type = run_info['machine_type'] - owner = run_info['owner'] + if 'machine_type' in run_info: + machine_type = run_info['machine_type'] + owner = run_info['owner'] + else: + log.warn("The run info does not have machine type: %s" % run_info) + log.warn("Run archive used: %s" % run_archive_dir) + log.info("Using machine type '%s' and owner '%s'" % (machine_type, owner)) elif machine_type is None: raise RuntimeError("The run is still entirely enqueued; " + "you must also pass --machine-type")