From 9de11851dbd905417f0edb74782320e66894a808 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 15 Oct 2017 20:46:28 +0800 Subject: [PATCH] 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 (cherry picked from commit ac1e13ce63a6f32ae9ab0db8196c8cc8100d94ed) --- qa/tasks/ceph.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 305754f4b23b5..fe74441449d94 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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 -- 2.39.5