fixes and move Dockerfile and install.sh to script. Make a package
diff --git a/INSTALL.md b/INSTALL.md
index 89da6ad..85affd1 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,7 +1,10 @@
Installation
------------
-Only Redhat/Ubuntu/Debian distros supported
+Only Redhat/Ubuntu/Debian distros are supported
+
+ # git clone https://github.com/Mirantis/disk_perf_test_tool wally
+ # cd wally
# git clone https://github.com/Mirantis/disk_perf_test_tool.git wally
# cd wally
@@ -14,7 +17,6 @@
# ./insall.sh --full
-
Manual installation:
Install : pip, python-openssl python-novaclient python-cinderclient
@@ -24,3 +26,23 @@
Then run
# pip install -r requirements.txt
+
+Create a directory for configs and copy wally/config_examples/default.yaml
+in it.
+
+Create a directory for results and update default.yaml
+settings::results_storage value to point to this directory.
+
+Copy appropriate file from wally/config_examples into the same folder,
+where default.yaml stored, update it, accordingly to you system and run
+wally
+
+$ export PYTHONPATH="$PYTHONPATH:WALLY_DIR"
+
+for python 2.7
+
+$ python -m wally test "my test comment" CONFIG_FILE
+
+for python 2.6 or 2.7
+
+$ python -m wally.__main__ test "my test comment" CONFIG_FILE
diff --git a/configs-examples/ceph_raw.yaml b/configs-examples/ceph_raw.yaml
index 9520a2f..27e7cf4 100644
--- a/configs-examples/ceph_raw.yaml
+++ b/configs-examples/ceph_raw.yaml
@@ -20,4 +20,4 @@
cfg: ceph
params:
FILENAME: /dev/rbd/rbd/${RBD_DEV_NAME_OR_LINK}
- FILESIZE: ${FILESIZE}
+ TEST_FILE_SIZE: ${FILESIZE}
diff --git a/configs-examples/hdd.yaml b/configs-examples/hdd.yaml
index d38904a..52a39d2 100644
--- a/configs-examples/hdd.yaml
+++ b/configs-examples/hdd.yaml
@@ -8,4 +8,4 @@
cfg: hdd
params:
FILENAME: ${FILEPATH}
- FILESIZE: ${FILESIZE}
+ TEST_FILE_SIZE: ${FILESIZE}
diff --git a/configs-examples/local_ceph.yaml b/configs-examples/local_ceph.yaml
index 519f094..02568e4 100644
--- a/configs-examples/local_ceph.yaml
+++ b/configs-examples/local_ceph.yaml
@@ -17,4 +17,4 @@
cfg: ceph
params:
FILENAME: ${CEPH_RBD_DEVICE}
- FILESIZE: ${FILESIZE}
+ TEST_FILE_SIZE: ${FILESIZE}
diff --git a/Dockerfile b/scripts/Dockerfile
similarity index 100%
rename from Dockerfile
rename to scripts/Dockerfile
diff --git a/install.sh b/scripts/install.sh
similarity index 100%
rename from install.sh
rename to scripts/install.sh
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..28fd266
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,25 @@
+[metadata]
+name = wally
+version = 1.0
+summary = Block storage test tool
+description-file =
+ README.md
+author = kostiantyn danilov aka koder
+author-email = kdanilov@mirantis.com
+home-page = https://github.com/Mirantis/disk_perf_test_tool
+classifier =
+ Intended Audience :: Developers
+ Intended Audience :: Information Technology
+ License :: OSI Approved :: Apache Software License
+ Operating System :: POSIX :: Linux
+ Programming Language :: Python
+ Programming Language :: Python :: 2
+ Programming Language :: Python :: 2.7
+
+[files]
+packages =
+ wally
+
+[entry_points]
+console_scripts =
+ wally = wally.__main__:main
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..7363757
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
+import setuptools
+
+# In python < 2.7.4, a lazy loading of package `pbr` will break
+# setuptools if some other modules registered functions in `atexit`.
+# solution from: http://bugs.python.org/issue15881#msg170215
+try:
+ import multiprocessing # noqa
+except ImportError:
+ pass
+
+setuptools.setup(
+ setup_requires=['pbr'],
+ pbr=True)
diff --git a/wally/report.py b/wally/report.py
index 8fc8400..424e1fa 100644
--- a/wally/report.py
+++ b/wally/report.py
@@ -10,6 +10,7 @@
import numpy
import scipy
import matplotlib
+ matplotlib.use('svg')
import matplotlib.pyplot as plt
except ImportError:
plt = None
diff --git a/wally/start_vms.py b/wally/start_vms.py
index 432594a..9da66f4 100644
--- a/wally/start_vms.py
+++ b/wally/start_vms.py
@@ -118,7 +118,7 @@
spath = os.path.dirname(os.path.dirname(wally.__file__))
spath = os.path.join(spath, 'scripts/prepare.sh')
- cmd = "bash {spath} >/dev/null 2>&1 ".format(spath=spath)
+ cmd = "bash {spath} >/dev/null 2>&1".format(spath=spath)
subprocess.check_call(cmd, shell=True, env=env)
while True:
diff --git a/wally/suits/io/ceph.cfg b/wally/suits/io/ceph.cfg
index 4093b06..9287030 100644
--- a/wally/suits/io/ceph.cfg
+++ b/wally/suits/io/ceph.cfg
@@ -5,7 +5,7 @@
NUMJOBS_W={% 1, 5, 10, 15, 25, 40 %}
NUMJOBS_SEQ_OPS={% 1, 3, 10 %}
-ramp_time=60
+ramp_time=30
runtime=180
# ---------------------------------------------------------------------
diff --git a/wally/suits/io/fio.py b/wally/suits/io/fio.py
index c009c3d..275c1ed 100644
--- a/wally/suits/io/fio.py
+++ b/wally/suits/io/fio.py
@@ -95,6 +95,9 @@
mm_res = {}
+ if len(res) == 0:
+ raise ValueError("No data was found")
+
for key, data in res.items():
conn_ids = sorted(conn_ids_set)
matr = [data[conn_id] for conn_id in conn_ids]
diff --git a/wally/suits/io/rrd.cfg b/wally/suits/io/rrd.cfg
index 094aa78..d6c04a0 100644
--- a/wally/suits/io/rrd.cfg
+++ b/wally/suits/io/rrd.cfg
@@ -1,12 +1,12 @@
[global]
include defaults.cfg
-ramp_time=30
-runtime=120
-numjobs={% 1,2,3 %}
+ramp_time=15
+runtime=3600
+numjobs=60
direct=1
# ---------------------------------------------------------------------
[test_{TEST_SUMM}]
-blocksize=4k
+blocksize=60k
rw=randwrite
sync=1
diff --git a/wally/suits/io/test.cfg b/wally/suits/io/test.cfg
new file mode 100644
index 0000000..296da06
--- /dev/null
+++ b/wally/suits/io/test.cfg
@@ -0,0 +1,20 @@
+[test1]
+buffered=0
+group_reporting=1
+iodepth=1
+unified_rw_reporting=1
+norandommap=1
+thread=1
+time_based=1
+wait_for_previous=1
+# this is critical for correct results in multy-node run
+randrepeat=0
+filename=/dev/rbd1
+size=10G
+ramp_time=10
+runtime=30
+numjobs=160
+sync=1
+direct=1
+blocksize=60k
+rw=randwrite