From: Sage Weil Date: Fri, 23 Jun 2017 20:02:26 +0000 (-0400) Subject: qa/tasks/ceph: create rbd pool after starting the osds X-Git-Tag: ses5-milestone8~1^2~21^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc486c6fbd1b78d228a3abda695763d95fd4ff9f;p=ceph.git qa/tasks/ceph: create rbd pool after starting the osds Signed-off-by: Sage Weil --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 00fc4a4f4903..42f268f1090b 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -326,6 +326,17 @@ def crush_setup(ctx, config): yield +@contextlib.contextmanager +def create_rbd_pool(ctx, config): + cluster_name = config['cluster'] + first_mon = teuthology.get_first_mon(ctx, config, cluster_name) + (mon_remote,) = ctx.cluster.only(first_mon).remotes.iterkeys() + log.info('Creating RBD pool') + mon_remote.run( + args=['sudo', 'ceph', '--cluster', cluster_name, + 'osd', 'pool', 'create', 'rbd', '8']) + yield + @contextlib.contextmanager def cephfs_setup(ctx, config): cluster_name = config['cluster'] @@ -1598,6 +1609,7 @@ def task(ctx, config): lambda: run_daemon(ctx=ctx, config=config, type_='mgr'), lambda: crush_setup(ctx=ctx, config=config), lambda: run_daemon(ctx=ctx, config=config, type_='osd'), + lambda: create_rbd_pool(ctx=ctx, config=config), lambda: cephfs_setup(ctx=ctx, config=config), lambda: run_daemon(ctx=ctx, config=config, type_='mds'), ]