From: Kefu Chai Date: Sun, 15 Oct 2017 12:46:28 +0000 (+0800) Subject: qa/tasks/ceph: add "create_rbd_pool" option X-Git-Tag: v13.0.1~533^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac1e13ce63a6f32ae9ab0db8196c8cc8100d94ed;p=ceph.git qa/tasks/ceph: add "create_rbd_pool" option True by default, but we can opt not to create the "rbd" pool. Signed-off-by: Kefu Chai --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index a37fec1c0703..efdcf9f08a6a 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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