add all-on-one shell scripts
diff --git a/io-scenario/io.yaml b/io-scenario/io.yaml
index d9c7ad4..df2bc51 100644
--- a/io-scenario/io.yaml
+++ b/io-scenario/io.yaml
@@ -1,22 +1,24 @@
----
- VMTasks.boot_runcommand_delete:
+VMTasks.boot_runcommand_delete:
-
- args:
- flavor:
- name: "m1.small"
- image:
- name: "ubuntu"
- floating_network: "net04_ext"
- force_delete: false
- script: "io.py"
- interpreter: "/usr/bin/env python2"
- username: "ubuntu"
- runner:
- type: "constant"
- times: 3
- concurrency: 3
- context:
- users:
- tenants: 3
- users_per_tenant: 2
- network: {}
\ No newline at end of file
+ args:
+ flavor:
+ name: "m1.small"
+ image:
+ name: "ubuntu"
+
+ floating_network: "net04_ext"
+ force_delete: false
+ script: "io.py"
+ interpreter: "/usr/bin/env python2"
+ username: "ubuntu"
+
+ runner:
+ type: "constant"
+ times: 3
+ concurrency: 3
+
+ context:
+ users:
+ tenants: 1
+ users_per_tenant: 1
+ network: {}
\ No newline at end of file
diff --git a/fix_rally.py b/run_rally_test.py
similarity index 92%
rename from fix_rally.py
rename to run_rally_test.py
index 4cac005..3787da4 100644
--- a/fix_rally.py
+++ b/run_rally_test.py
@@ -57,7 +57,14 @@
barrier=None,
latest_start_time=None):
- orig = VMScenario.run_command_over_ssh
+ try:
+ orig = VMScenario.run_action
+ except AttributeError:
+ # rally code was changed
+ log("VMScenario class was changed and have no run_action"
+ " method anymore. Update patch code.")
+ raise exceptions.ScriptError("monkeypatch code fails on "
+ "VMScenario.run_action")
@functools.wraps(orig)
def closure(self, ssh, *args, **kwargs):
@@ -128,17 +135,18 @@
except Exception as err:
log("Error during postprocessing results: {0!r}".format(err))
- result = {"rally": 0, "srally": 1}
+ # result = {"rally": 0, "srally": 1}
+ result = {"rally": 0}
out = json.dumps(result)
return code, out, err
- VMScenario.run_command_over_ssh = closure
+ VMScenario.run_action = closure
try:
yield
finally:
- VMScenario.run_command_over_ssh = orig
+ VMScenario.run_action = orig
def run_rally(rally_args):
@@ -264,14 +272,16 @@
'-a', op,
'--iodepth', iodepth,
'--blocksize', block_size,
- '--iosize', '20M',
- '--binary-path', dst_testtool_path]
+ '--iosize', '20M']
if sync:
tt_argv.append('-s')
testtool_py_args_v.append(tt_argv)
else:
testtool_py_args_v = [o.split(" ") for o in opts.io_opts]
+ for io_argv_list in testtool_py_args_v:
+ io_argv_list.extend(['--binary-path', dst_testtool_path])
+
res = run_test(opts.tool_type,
testtool_py_args_v,
dst_testtool_path,
@@ -279,7 +289,7 @@
rally_extra_opts=opts.rally_extra_opts,
max_preparation_time=opts.max_preparation_time)
- print "Results =",
+ print "Results = ",
pprint.pprint(res)
return 0
diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 0000000..f80e5be
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -x
+set -e
+
+CMD1="--type iozone -a write --iodepth 8 --blocksize 4k --iosize 40M -s"
+CMD2="--type fio -a write --iodepth 8 --blocksize 4k --iosize 4M -s"
+
+python run_rally_test.py -l -o "$CMD1" -t io-scenario iozone 2>&1 | tee ceph_results.txt
+python run_rally_test.py -l -o "$CMD2" -t io-scenario fio 2>&1 | tee -a ceph_results.txt
+