]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph: add "create_rbd_pool" option
authorKefu Chai <kchai@redhat.com>
Sun, 15 Oct 2017 12:46:28 +0000 (20:46 +0800)
committerShylesh Kumar <shylesh.mohan@gmail.com>
Wed, 9 May 2018 03:31:45 +0000 (09:01 +0530)
True by default, but we can opt not to create the "rbd" pool.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ac1e13ce63a6f32ae9ab0db8196c8cc8100d94ed)

qa/tasks/ceph.py

index 305754f4b23b53696edb66ec40a39f309e1474ec..fe74441449d949bb8d8fd00f52e7e264c39ee727 100644 (file)
@@ -318,17 +318,18 @@ def create_rbd_pool(ctx, config):
         remote=mon_remote,
         ceph_cluster=cluster_name,
     )
-    log.info('Creating RBD pool')
-    mon_remote.run(
-        args=['sudo', 'ceph', '--cluster', cluster_name,
-              'osd', 'pool', 'create', 'rbd', '8'])
-    mon_remote.run(
-        args=[
-            'sudo', 'ceph', '--cluster', cluster_name,
-            'osd', 'pool', 'application', 'enable',
-            'rbd', 'rbd', '--yes-i-really-mean-it'
-        ],
-        check_status=False)
+    if config.get('create_rbd_pool', True):
+        log.info('Creating RBD pool')
+        mon_remote.run(
+            args=['sudo', 'ceph', '--cluster', cluster_name,
+                  'osd', 'pool', 'create', 'rbd', '8'])
+        mon_remote.run(
+            args=[
+                'sudo', 'ceph', '--cluster', cluster_name,
+                'osd', 'pool', 'application', 'enable',
+                'rbd', 'rbd', '--yes-i-really-mean-it'
+            ],
+            check_status=False)
     yield
 
 @contextlib.contextmanager