]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
lock: make do_summary() respect --machine-type
authorDan Mick <dan.mick@inktank.com>
Thu, 21 Mar 2013 01:30:29 +0000 (18:30 -0700)
committerDan Mick <dan.mick@inktank.com>
Thu, 21 Mar 2013 01:31:11 +0000 (18:31 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
teuthology/lock.py

index 4e89ebf440ec8cb8225527140214136411a7cf3f..33776f7d18e23c814fb88d86db18306c8164c7a7 100644 (file)
@@ -459,6 +459,8 @@ to run on, or use -a to check all of them automatically.
 def do_summary(ctx):
     lockd = collections.defaultdict(lambda: [0,0,'unknown'])
     for l in list_locks(ctx):
+        if l['type'] != ctx.machine_type:
+            continue
         who =  l['locked_by'] if l['locked'] == 1 else '(free)', l['type']
         lockd[who][0] += 1
         lockd[who][1] += l['up']         # up is 1 or 0