From bfb276091cdaadf96989e6f1b72d6d164169d83e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 20 Sep 2013 12:56:45 -0700 Subject: [PATCH] rados: only pass --op copy_from if non-zero Among other things, this does not work with older ceph_test_rados binaries. Backport: next Signed-off-by: Sage Weil --- teuthology/task/rados.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/teuthology/task/rados.py b/teuthology/task/rados.py index 0c582351a4..2082e17717 100644 --- a/teuthology/task/rados.py +++ b/teuthology/task/rados.py @@ -70,7 +70,6 @@ def task(ctx, config): '--op', 'setattr', str(op_weights.get('setattr', 0)), '--op', 'rmattr', str(op_weights.get('rmattr', 0)), '--op', 'watch', str(op_weights.get('watch', 0)), - '--op', 'copy_from', str(op_weights.get('copy_from', 0)), '--max-ops', str(config.get('ops', 10000)), '--objects', str(config.get('objects', 500)), '--max-in-flight', str(config.get('max_in_flight', 16)), @@ -79,6 +78,10 @@ def task(ctx, config): '--max-stride-size', str(config.get('max_stride_size', object_size / 5)), '--max-seconds', str(config.get('max_seconds', 0)) ] + if 'copy_from' in op_weights: + args.extend([ + '--op', 'copy_from', str(op_weights.get('copy_from', 0)) + ]) def thread(): if not hasattr(ctx, 'manager'): -- 2.39.5