From 9f5b0370dd07c571c58653d03a2eabe53b2e4793 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 24 Mar 2016 18:21:13 -0700 Subject: [PATCH] tasks/thrash_pool_snaps: adjust to new ctx.manager location Signed-off-by: Josh Durgin --- tasks/thrash_pool_snaps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/thrash_pool_snaps.py b/tasks/thrash_pool_snaps.py index 1c3f8f4f92e..c71c9ce8d2a 100644 --- a/tasks/thrash_pool_snaps.py +++ b/tasks/thrash_pool_snaps.py @@ -30,17 +30,18 @@ def task(ctx, config): min_snaps = config.get('min_snaps', 5) period = config.get('period', 30) snaps = [] + manager = ctx.managers['ceph'] def remove_snap(): assert len(snaps) > 0 snap = random.choice(snaps) log.info("Removing snap %s" % (snap,)) for pool in pools: - ctx.manager.remove_pool_snap(pool, str(snap)) + manager.remove_pool_snap(pool, str(snap)) snaps.remove(snap) def add_snap(snap): log.info("Adding snap %s" % (snap,)) for pool in pools: - ctx.manager.add_pool_snap(pool, str(snap)) + manager.add_pool_snap(pool, str(snap)) snaps.append(snap) index = 0 while not stopping: