From 3e6b17f1b844940041066b1c4a334b7b30fe9453 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 5 Aug 2011 10:59:16 -0700 Subject: [PATCH] Down machines shouldn't be considered free. --- teuthology/task/internal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index d5592ce2ef31f..0aa77c8d6e28d 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -58,7 +58,10 @@ def lock_machines(ctx, config): assert num_up >= config, 'not enough machines are up' # make sure there are machines for non-automated jobs to run - num_free = len(filter(lambda machine: machine['locked'] == 0, machines)) + num_free = len(filter( + lambda machine: machine['up'] and machine['locked'] == 0, + machines + )) if num_free < 6 and ctx.owner.startswith('scheduled'): if ctx.block: log.info('waiting for more machines to be free...') -- 2.39.5