]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_objectstore_tool: add pgnum option
authorLoic Dachary <ldachary@redhat.com>
Wed, 19 Nov 2014 17:54:02 +0000 (18:54 +0100)
committerDavid Zafman <dzafman@redhat.com>
Wed, 4 Mar 2015 00:03:59 +0000 (16:03 -0800)
Instead of hardcoding 12 use a configuration option that defaults to
12. It is handy during development to lower the number to 4 and speed up
the test cycle.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit d0caf5cdffe26f27b0a25ebdb96d9b0fd37ffffc)

tasks/ceph_objectstore_tool.py

index ad28063e20cdf0bcc87f7600377d8ffff747614a..4ea6ad255f10316c9c702ac533433bf1df7ecc31 100644 (file)
@@ -144,7 +144,8 @@ def task(ctx, config):
     The config should be as follows::
 
         ceph_objectstore_tool:
-          objects: <number of objects>
+          objects: 20 # <number of objects>
+          pgnum: 12
     """
 
     if config is None:
@@ -200,11 +201,14 @@ def task(ctx, config):
     manager.raw_cluster_cmd('osd', 'set', 'noout')
     manager.raw_cluster_cmd('osd', 'set', 'nodown')
 
+    PGNUM = config.get('pgnum', 12)
+    log.info("pgnum: {num}".format(num=PGNUM))
+
     ERRORS = 0
 
     REP_POOL = "rep_pool"
     REP_NAME = "REPobject"
-    create_replicated_pool(cli_remote, REP_POOL, 12)
+    create_replicated_pool(cli_remote, REP_POOL, PGNUM)
     ERRORS += test_objectstore(ctx, config, cli_remote, REP_POOL, REP_NAME)
 
     if ERRORS == 0: