]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Down machines shouldn't be considered free.
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 5 Aug 2011 17:59:16 +0000 (10:59 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 5 Aug 2011 17:59:16 +0000 (10:59 -0700)
teuthology/task/internal.py

index d5592ce2ef31f9337d2e88f0648e0627320915d3..0aa77c8d6e28d4046a59ae68214766b083e89d96 100644 (file)
@@ -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...')