]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/rados: make {write,append}_excl conditional
authorSage Weil <sage@redhat.com>
Sun, 14 Jun 2015 01:22:34 +0000 (18:22 -0700)
committerSage Weil <sage@redhat.com>
Wed, 8 Jul 2015 14:43:22 +0000 (10:43 -0400)
For upgrade tests we don't want to pass these args to (old)
ceph_test_rados.

Signed-off-by: Sage Weil <sage@redhat.com>
tasks/rados.py

index 044770e023c7e08395e85e3e422ae58047ecd3c6..6bf8a533751543cc456bfba221330bd5579f5437 100644 (file)
@@ -180,13 +180,14 @@ def task(ctx, config):
         if field in op_weights:
             weights[field] = op_weights[field]
 
-    if 'write' in weights:
-        weights['write'] = weights['write'] / 2
-        weights['write_excl'] = weights['write']
-
-    if 'append' in weights:
-        weights['append'] = weights['append'] / 2
-        weights['append_excl'] = weights['append']
+    if config.get('write_append_excl', True):
+        if 'write' in weights:
+            weights['write'] = weights['write'] / 2
+            weights['write_excl'] = weights['write']
+
+        if 'append' in weights:
+            weights['append'] = weights['append'] / 2
+            weights['append_excl'] = weights['append']
 
     for op, weight in weights.iteritems():
         args.extend([