]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/rados: add optional setting of "min_size"
authorKefu Chai <kchai@redhat.com>
Fri, 28 Apr 2017 14:18:26 +0000 (22:18 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 29 Apr 2017 02:39:02 +0000 (10:39 +0800)
this setting only affects the newly created pool

Fixes: http://tracker.ceph.com/issues/19770
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/rados.py

index 2ef542fd278563a6cd28b9c46ac4474ea43322c3..932d0f479b0624f0af5b871992b4ca26f870b27f 100644 (file)
@@ -29,6 +29,8 @@ def task(ctx, config):
           runs: <number of times to run> - the pool is remade between runs
           ec_pool: use an ec pool
           erasure_code_profile: profile to use with the erasure coded pool
+          fast_read: enable ec_pool's fast_read
+          min_size: set the min_size of created pool
           pool_snaps: use pool snapshots instead of selfmanaged snapshots
          write_fadvise_dontneed: write behavior like with LIBRADOS_OP_FLAG_FADVISE_DONTNEED.
                                  This mean data don't access in the near future.
@@ -233,6 +235,10 @@ def task(ctx, config):
                     if config.get('fast_read', False):
                         manager.raw_cluster_cmd(
                             'osd', 'pool', 'set', pool, 'fast_read', 'true')
+                    min_size = config.get('min_size', None);
+                    if min_size is not None:
+                        manager.raw_cluster_cmd(
+                            'osd', 'pool', 'set', pool, 'min_size', min_size)
 
                 (remote,) = ctx.cluster.only(role).remotes.iterkeys()
                 proc = remote.run(