]> 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)
committerKefu Chai <kchai@redhat.com>
Tue, 17 Oct 2017 03:15:32 +0000 (11:15 +0800)
True by default, but we can opt not to create the "rbd" pool.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/ceph.py

index a37fec1c070374e88612306dd9797a88219637f7..efdcf9f08a6ae55920070e99043005335621cef7 100644 (file)
@@ -338,17 +338,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