From: Josh Durgin Date: Thu, 2 Jun 2016 22:24:56 +0000 (-0700) Subject: tasks: fix non-existent sleep function X-Git-Tag: v11.1.1~58^2^2~184^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cfc48e36da74cd8b840270e388cc4b7e3efc1b58;p=ceph.git tasks: fix non-existent sleep function CephManager has no sleep function. Use time.sleep() instead. Ran into this while testing a branch. Apparently it doesn't happen much since this hasn't changed in years, but the error was copied into several tasks. Signed-off-by: Josh Durgin --- diff --git a/tasks/object_source_down.py b/tasks/object_source_down.py index 17b94490668..bea3d18c8d1 100644 --- a/tasks/object_source_down.py +++ b/tasks/object_source_down.py @@ -3,6 +3,7 @@ Test Object locations going down """ import logging import ceph_manager +import time from teuthology import misc as teuthology from util.rados import rados @@ -26,7 +27,7 @@ def task(ctx, config): ) while len(manager.get_osd_status()['up']) < 3: - manager.sleep(10) + time.sleep(10) manager.wait_for_clean() # something that is always there diff --git a/tasks/osd_backfill.py b/tasks/osd_backfill.py index f3b59e398cb..f0bba7963ee 100644 --- a/tasks/osd_backfill.py +++ b/tasks/osd_backfill.py @@ -51,7 +51,7 @@ def task(ctx, config): ) while len(manager.get_osd_status()['up']) < 3: - manager.sleep(10) + time.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.2', 'flush_pg_stats') diff --git a/tasks/osd_recovery.py b/tasks/osd_recovery.py index a22fdb9423e..6252a95a699 100644 --- a/tasks/osd_recovery.py +++ b/tasks/osd_recovery.py @@ -51,7 +51,7 @@ def task(ctx, config): ) while len(manager.get_osd_status()['up']) < 3: - manager.sleep(10) + time.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.2', 'flush_pg_stats') diff --git a/tasks/peer.py b/tasks/peer.py index f1789cf12d6..a189ae06a77 100644 --- a/tasks/peer.py +++ b/tasks/peer.py @@ -3,6 +3,7 @@ Peer test (Single test, not much configurable here) """ import logging import json +import time import ceph_manager from teuthology import misc as teuthology @@ -28,7 +29,7 @@ def task(ctx, config): ) while len(manager.get_osd_status()['up']) < 3: - manager.sleep(10) + time.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.2', 'flush_pg_stats') diff --git a/tasks/recovery_bench.py b/tasks/recovery_bench.py index 1984b97d31e..5eb9fd21d46 100644 --- a/tasks/recovery_bench.py +++ b/tasks/recovery_bench.py @@ -58,7 +58,7 @@ def task(ctx, config): num_osds = teuthology.num_instances_of_type(ctx.cluster, 'osd') while len(manager.get_osd_status()['up']) < num_osds: - manager.sleep(10) + time.sleep(10) bench_proc = RecoveryBencher( manager, diff --git a/tasks/rep_lost_unfound_delete.py b/tasks/rep_lost_unfound_delete.py index be3bc74ed60..b0ba3dc0ed0 100644 --- a/tasks/rep_lost_unfound_delete.py +++ b/tasks/rep_lost_unfound_delete.py @@ -31,7 +31,7 @@ def task(ctx, config): ) while len(manager.get_osd_status()['up']) < 3: - manager.sleep(10) + time.sleep(10) manager.raw_cluster_cmd('tell', 'osd.0', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.1', 'flush_pg_stats') manager.raw_cluster_cmd('tell', 'osd.2', 'flush_pg_stats') diff --git a/tasks/scrub.py b/tasks/scrub.py index 7a25300a677..9800d1e98a5 100644 --- a/tasks/scrub.py +++ b/tasks/scrub.py @@ -49,7 +49,7 @@ def task(ctx, config): num_osds = teuthology.num_instances_of_type(ctx.cluster, 'osd') while len(manager.get_osd_status()['up']) < num_osds: - manager.sleep(10) + time.sleep(10) scrub_proc = Scrubber( manager,