aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/storage/fio.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-15Convert SLA asserts to raisesMiikka Koistinen1-1/+1
This commit converts Python assertions to a custom exception in all places where SLA validation is checked with an assertion. This commit also fixes all emerged pylint errors. JIRA: YARDSTICK-966 Change-Id: If771ed03b2cbc0a43a57fcfb9293f18740b3ff80 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-02-27[bugfix]tc006 failed due to volume attached to different location "/dev/vdc"JingLu51-6/+10
JIRA: YARDSTICK-857 The yardstick test suites are failing for os-odl-bgpvpn-ha and os-odl-bgpvpn-noha scenarios installed with apex. Here are the yardstick test run logs: os-odl-bgpvpn-ha: https://build.opnfv.org/ci/job/yardstick-apex-baremetal-daily-master/624//consoleFull, https://build.opnfv.org/ci/job/yardstick-apex-baremetal-daily-master/640//consoleFull os-odl-bgpvpn-noha: https://build.opnfv.org/ci/job/yardstick-apex-baremetal-daily-master/637//console The root cause of the problem is in some environment the block device cannot be attached to the target path. In this patch, the actually device path is found and used. Change-Id: I46c601960a0668c81f9b73504ef9553f9e8591dc Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-10-17Fio: support input job file configurationJingLu51-1/+16
Change-Id: I4bb15a398819e54f7fb3e9eac17daa4059c03376 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-08-22Test case: Fio volume benchmark testcase using job fileJingLu51-37/+79
JIRA: YARDSTICK-791 In some use cases, Fio is used with a job file instead of parameters. This work is about adding support for the job file and add a new test case for volume testing. Change-Id: I312d61bf6e7d95f23eedb0b6487f6103b7d76355 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-20Improvement: support more parameters in fio testcaseJingLu51-6/+26
JIRA: YARDSTICK-750 The parameters that fio testcase support now maybe insufficient in some usecase. The test case should support parameters such as: rwmixwrite, size, direct and numjobs. This work is about add more parameters that can be specified in options section in the YAML file. Change-Id: Icccf024dc78d82bc453480f3baafb8aaa5c19538 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-04-11standardize ssh authRoss Brattain1-8/+2
we need to be following defautl paramiko rules, first use pkey, then key_filenames (autodetecting ~/.ssh/ keys), then password We have too much boilerplate redudant code everywhere, we need to standardize on a factory function that takes a node dict. Using Python3 ChainMap we can layer overrides and defaults. VNF descriptors have to default key_filename, password to Python None. The only way to do this is to omit key values if the variable is not defined, this way the dict will not have the value and it will default to Python None Add python2 chainmap backport Updated unittest mocking to use ssh.SSH.from_node Change-Id: I80b0cb606e593b33e317c9e5e8ed0b74da591514 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-16Use """ to replace ''' in docstringchenjiankun1-2/+2
JIRA: YARDSTICK-525 For consistency, we always use """triple double quotes""" around docstrings. Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-12Add support for Python 3Ross Brattain1-4/+9
Porting to Python3 using Openstack guidelines: https://wiki.openstack.org/wiki/Python3 This passes unittests on Python 3.5 and passes opnfv_smoke suite Updates: use six for urlparse and urlopen fix exception.message attribute removal run unittests on python3 use unitest.mock on python 3 fix open mock for vsperf fix float division by using delta/eplison comparison use unicode in StringIO use plugin/sample_config.yaml relative path from test case fixed apexlake unittests upgraded to mock 2.0.0 to match python3 unittest.mock features fixed flake8 issues implement safe JSON decode with oslo_serialization.jsonutils.dump_as_bytes() implement safe unicode encode/decode with oslo_utils.encodeutils heat: convert pub key file from bytes to unicode pkg_resources returns raw bytes, in python3 we have to decode this to utf-8 unicode so JSON can encode it for heat template JIRA: YARDSTICK-452 Change-Id: Ib80dd1d0c0eb0592acd832b82f6a7f8f7c20bfda Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-05use context manager for stdin files and use _put_file_shellRoss Brattain1-2/+1
requires https://gerrit.opnfv.org/gerrit/#/c/25183/ use new ssh method _put_file_shell to upload files. We have to use _put_file_shell because we rely on ~/ path expansions. Eventually we should move to remote absolute paths so we can use sftp upload. For ssh.execute() replace open() with context manager context managers were invented partly to control freeing resources. Opening files without closing them will leak file descriptors. The old standard method for closing files: f = open('data.txt') try: data = f.read() finally: f.close() was replaced with a context manager with open('data.txt') as f: data = f.read() Reference: Raymond Hettinger's Pycon 2013 presentation: https://speakerdeck.com/pyconslides/transforming-code-into-beautiful-idiomatic-python-by-raymond-hettinger-1 Video: https://youtu.be/OSGv2VnC0go?t=2522 Always use context managers for files Update: rebased now that _put_file_shell was merged Change-Id: Iabfc0e43aa3b7766d7c658115e13d21c31efb2a9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-10add option to connect to non-standard ssh portRoss Brattain1-1/+3
not all enviroments have port 22 enabled for SSH. In particular for network isolation NAT and port forwarding may be used. example pod.yaml: nodes: - ip: 10.2.45.145 name: node1 password: '' role: Controller ssh_port: 5000 user: root - ip: 10.2.45.145 name: node2 password: '' role: Controller ssh_port: 5001 user: root - ip: 10.2.45.145 name: node3 password: '' role: Controller ssh_port: 5002 user: root JIRA: YARDSTICK-407 Change-Id: I8f9d6e388f31d291dd15cb900d7f71f347e41ef6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-01-15HeatContext model update to match heat code updateQiLiang1-3/+3
In Heat Liberty release OS::Nova::Server will always use the user pre-configured in the image (e.g. "fedora" for stock Fedora cloud images, "ubuntu" for stock Ubuntu cloud images, "cloud-user" for stock CentOS cloud images etc) Change all ec2-user -> ubuntu Add admin-user in Heat model for backwards compatibility. Refer below links for detalis: https://etherpad.opnfv.org/p/yardstick_release_b_troubleshooting https://github.com/openstack/heat/commit/e423bec7f10b0f5d07f05d195b3b7860f6bceb00 http://blog.scottlowe.org/2015/04/23/ubuntu-openstack-heat-cloud-init/ JIRA: - Change-Id: I6b8b2b21daf113a3a86aee1126b0c3e74737ef4f Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-10-27Heat context code refactor part 2QiLiang1-20/+25
Heat context code refactor to cater for the evolution of the Yardstick framework. Refactor runner_cfg host/target info handle, as specified at https://etherpad.opnfv.org/p/yardstick_framework step 4. Get general Context info (use Context.get). Before this refactor host and target vm must have the same user name and ssh key, that is not general enough for later extension. test_case.yaml do NOT need to change. JIRA: YARDSTICK-168 Change-Id: I5cfe868f3c6f633214ef550bc9676fe1de0709db Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-10-22Update sla check for scenarioshoujingwen1-7/+8
This patch modify the question that SLA check result is not complete. JIRA: YARDSTICK-172 Change-Id: I10438390baee92caf00dbfcdbdb833823ff8ce31 Signed-off-by: houjingwen <houjingwen@huawei.com>
2015-10-13Fio scenario support slahoujingwen1-8/+24
JIRA: YARDSTICK-34 Change-Id: I782ba5845f8bd54a19bad078fe7be546400f7524 Signed-off-by: houjingwen <houjingwen@huawei.com>
2015-09-24Fix bug in fio scenariohoujingwen1-13/+26
1) when duration>3600s in fio.yaml, ssh time out 2) sometimes the latency value in test result is null 3) update plot.py, fit for code update in fio.py 4) small bug in file.py (result output dump) Add --output-format=json in default args, so fio command can return json format data. JIRA: YARDSTICK-143 Change-Id: Ie02977b8c9f11986a1eed66896b84d18db3d2211 Signed-off-by: houjingwen <houjingwen@huawei.com>
2015-09-16Remove setting logger level to debug in scenariosKristian Hunt1-2/+1
Logging level should be specified using a command line flag -v or -d when running yardstick, rather than hardcoded into source code. If the message is to be displayed whenever yardstick is executed regardless of the verbosity level, then the message should be logged to warning or error levels, instead of debug. JIRA: YARDSTICK-95 Change-Id: Idc9b81b583f4999bfbc57893f0ab3c3675c70f71 Signed-off-by: Kristian Hunt <kristian.hunt@gmail.com>
2015-08-26FIO support variable iodepthhoujingwen1-3/+10
FIO storage performance varification support variable iodepth. JIRA: YARDSTICK-119 Change-Id: Ib6af55c5fbcaa7727a7541b13053b5e4ce8d3203 Signed-off-by: houjingwen <houjingwen@huawei.com>
2015-07-06Add support for measuring storage performance use fiohoujingwen1-0/+139
A simple test case is added that will test writes to ephemeral storage. See samples/fio.yaml The Fio test type can also be used to test block storage, just modify the "filename" argument. JIRA: YARDSTICK-34 Change-Id: I1758d2999f8a5fdd44726e1dfc3e9769ea39dad6 Signed-off-by: houjingwen <houjingwen@huawei.com>