yaml config containing machines to nuke
-a DIR, --archive DIR
archive path for a job to kill and nuke
+ --stale attempt to find and nuke 'stale' machines
+ (e.g. locked by jobs that are no longer running)
--owner OWNER job owner
-p PID, --pid PID pid of the process to be killed
-r, --reboot-all reboot all machines
from .config import FakeNamespace
from .lock import list_locks
from .lock import unlock_one
+from .lock import find_stale_locks
from .misc import config_file
from .misc import merge_configs
from .misc import get_testdir
if ctx.targets:
ctx.config = merge_configs(ctx.targets)
+ if ctx.stale:
+ stale_nodes = find_stale_locks(ctx.owner)
+ targets = dict()
+ for node in stale_nodes:
+ targets[node['name']] = node['ssh_pub_key']
+ ctx.config = dict(targets=targets)
+
read_config(ctx)
log.info(