]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test: ceph-objectstore-tool add configurable number of cloned objects
authorDavid Zafman <dzafman@redhat.com>
Tue, 26 Jul 2016 22:21:44 +0000 (15:21 -0700)
committerDavid Zafman <dzafman@redhat.com>
Wed, 27 Jul 2016 16:58:59 +0000 (09:58 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/test/ceph_objectstore_tool.py

index 857fe0ec38d9c47d18400eb1388a71a8a4f370ca..041f7e3d6604bd1b55c8e07f491f79dd09b9acd1 100755 (executable)
@@ -594,6 +594,7 @@ def main(argv):
     if len(argv) > 0 and argv[0] == 'large':
         PG_COUNT = 12
         NUM_REP_OBJECTS = 800
+        NUM_CLONED_REP_OBJECTS = 100
         NUM_EC_OBJECTS = 12
         NUM_NSPACES = 4
         # Larger data sets for first object per namespace
@@ -603,6 +604,7 @@ def main(argv):
     else:
         PG_COUNT = 4
         NUM_REP_OBJECTS = 2
+        NUM_CLONED_REP_OBJECTS = 2
         NUM_EC_OBJECTS = 2
         NUM_NSPACES = 2
         # Larger data sets for first object per namespace
@@ -730,7 +732,7 @@ def main(argv):
     logging.debug(cmd)
     call(cmd, shell=True)
 
-    objects = range(1, NUM_REP_OBJECTS + 1)
+    objects = range(1, NUM_CLONED_REP_OBJECTS + 1)
     nspaces = range(NUM_NSPACES)
     for n in nspaces:
         nspace = get_nspace(n)
@@ -1377,6 +1379,8 @@ def main(argv):
                               and f.split("_")[0] == basename and f.split("_")[4] == nspace]
                     if not fnames:
                         continue
+                    if int(basename.split(REP_NAME)[1]) > int(NUM_CLONED_REP_OBJECTS):
+                        continue
                     cmd = (CFSD_PREFIX + " '{json}' dump | grep '\"snap\": 1,' > /dev/null").format(osd=osd, json=JSON)
                     logging.debug(cmd)
                     ret = call(cmd, shell=True)