]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph: create rbd pool after starting the osds
authorSage Weil <sage@redhat.com>
Fri, 23 Jun 2017 20:02:26 +0000 (16:02 -0400)
committerSage Weil <sage@redhat.com>
Wed, 28 Jun 2017 14:52:49 +0000 (10:52 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph.py

index 00fc4a4f4903bb1088ace7a8b03576b697461808..42f268f1090b4bacd48a60286bbc3b4593992111 100644 (file)
@@ -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'),
     ]