From: Sage Weil Date: Thu, 19 Apr 2012 19:43:54 +0000 (-0700) Subject: fix misc checks that wait for N osds to be up X-Git-Tag: 1.1.0~2570 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a58314d4627d106c5fd6df186e191c19a01f64b;p=teuthology.git fix misc checks that wait for N osds to be up These all cut&pasted broken code, blah! --- diff --git a/teuthology/task/lost_unfound.py b/teuthology/task/lost_unfound.py index 2cfc4eadc..09932e451 100644 --- a/teuthology/task/lost_unfound.py +++ b/teuthology/task/lost_unfound.py @@ -40,7 +40,7 @@ def task(ctx, config): logger=log.getChild('ceph_manager'), ) - while manager.get_osd_status()['up'] < 3: + while len(manager.get_osd_status()['up']) < 3: manager.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') diff --git a/teuthology/task/object_source_down.py b/teuthology/task/object_source_down.py index 89d812f76..7c69f91bb 100644 --- a/teuthology/task/object_source_down.py +++ b/teuthology/task/object_source_down.py @@ -41,7 +41,7 @@ def task(ctx, config): logger=log.getChild('ceph_manager'), ) - while manager.get_osd_status()['up'] < 3: + while len(manager.get_osd_status()['up']) < 3: manager.sleep(10) manager.wait_for_clean() diff --git a/teuthology/task/osd_backfill.py b/teuthology/task/osd_backfill.py index 7660142e2..008da1cd0 100644 --- a/teuthology/task/osd_backfill.py +++ b/teuthology/task/osd_backfill.py @@ -45,7 +45,7 @@ def task(ctx, config): logger=log.getChild('ceph_manager'), ) - while manager.get_osd_status()['up'] < 3: + while len(manager.get_osd_status()['up']) < 3: manager.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') diff --git a/teuthology/task/osd_recovery.py b/teuthology/task/osd_recovery.py index 9b5252184..27596b39c 100644 --- a/teuthology/task/osd_recovery.py +++ b/teuthology/task/osd_recovery.py @@ -45,7 +45,7 @@ def task(ctx, config): logger=log.getChild('ceph_manager'), ) - while manager.get_osd_status()['up'] < 3: + while len(manager.get_osd_status()['up']) < 3: manager.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') @@ -81,9 +81,9 @@ def task(ctx, config): # revive divergent osd manager.revive_osd(2) - while manager.get_osd_status()['up'] < 3: + while len(manager.get_osd_status()['up']) < 3: log.info('waiting a bit...') - manager.sleep(2) + time.sleep(2) log.info('3 are up!') # cluster must recover diff --git a/teuthology/task/peer.py b/teuthology/task/peer.py index 78971daf0..e0209f830 100644 --- a/teuthology/task/peer.py +++ b/teuthology/task/peer.py @@ -41,7 +41,7 @@ def task(ctx, config): logger=log.getChild('ceph_manager'), ) - while manager.get_osd_status()['up'] < 3: + while len(manager.get_osd_status()['up']) < 3: manager.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats')