aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
AgeCommit message (Collapse)AuthorFilesLines
2017-05-04Bugfix: fix HA test case tc046JingLu53-3/+11
The original way to kill keystone service didn't work anymore. this patch uses killall -u to kill keystone processes. Change-Id: I553b716f17a5ab7e57630468517642a92f06dd27 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 909606466c50aab19017b6e6cedd3e213aff7c27)
2017-05-04operation_general: fix logging to use %sRoss Brattain1-1/+1
Change-Id: I1b37cbf07e8858ca3e75bb74c57fe84485ff4989 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 37f600566c56542999529da47299c4caf54d073a)
2017-05-04Merge "Bugfix: fix HA testcases" into stable/danubeJing Lu3-11/+3
2017-05-04Merge "Bugfix: KeyError when using http dispatcher" into stable/danubeJing Lu1-1/+6
2017-05-04Merge "cachestat: use raw strings to escape \d" into stable/danubeJing Lu1-1/+1
2017-05-04Bugfix: KeyError when using http dispatcherchenjiankun1-1/+6
JIRA: YARDSTICK-632 When we use http dispatcher to output yardstick result. It can upload data, but when we query the data, it get a KeyError. Change-Id: I5410c207c68cff2621ff8184ae17daa4c286cea5 Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit 1f59f2e6769cc7ae6f3b73eb1ce8ee09f2929f72)
2017-05-04cachestat: use raw strings to escape \dRoss Brattain1-1/+1
Change-Id: Iff40f7c938af0d7c148c708eed19095b140ccb8b Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 6bdf476e43200fefb09a11ea1f6312ca8735fd52)
2017-05-04Bugfix: fix HA testcasesJingLu53-11/+3
Change-Id: Ic930c59fcf3d7e53d385016051596b6563dca0d7 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 01261850ea2ea2cb92572c9cfcb2c64bfafe9cbe)
2017-05-04bugfix: fix HA testcasesJingLu51-1/+1
Change-Id: Ib38e94610a108ff7195cefdfaf048e0f4fd894e8 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 6604cb5f2d6e3c819cb8488f1ad3468184822cf9)
2017-04-06Bugfix: fix query job status in TC074JingLu51-3/+4
JIRA: YARDSTICK-621 The storperf job status query in TC074 didn' work properly. The cause is the "type: status" is not passed in the URL. This patch also update storperf VM image to xenial. Change-Id: Idd9f501416b24612f6045a57ba2a95e2ed3a9572 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit b2fb23ca8ccc1acedaa9156552af4ba347f24103)
2017-04-06Yardstick virtualenv supportchenjiankun4-8/+7
JIRA: YARDSTICK-620 Currently we recommend using docker to run yardstick. And it is hard to use virtualenv to install yardstick. So I modify install.sh in yardstick root path. It will support using virtualenv to install yardstick(including API) in linux. In this patch, I make yardstick support read yardstick configuration have priority over constants. Change-Id: I9ea1241b228532a6497451e6c8f232173ddb783e Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit b74d875134b988a26441d559a9e700aaa68d6a0c)
2017-03-30Yardstick: User interface for Yardstick.rajesh_4k3-0/+132
Currently Yardstick doesnt have any UI which gives detail analysis of the test-results. This commit generates a HTML page after the execution of a command "yardstick report generate <task-ID> <TC-name>" which intern can be executed after the execution of test-case. Used: Highcharts.js for the graphs. JIRA: YARDSTICK-280 Change-Id: Ic98cc348719f3922bff178f52e7944a4a931763a Signed-off-by: Rajesh K <4k.rajesh@gmail.com> (cherry picked from commit 25b21add71fcf7c2c795bd950b5117d69fac68fb)
2017-03-25Merge "Add CPU pinning support for node context" into stable/danubeJing Lu1-8/+29
2017-03-21Bugfix: netperf_bottleneck execute failed because is_same_heat_context ↵chenjiankun1-1/+0
return True JIRA: YARDSTICK-600 Bugfix: netperf_bottleneck execute failed because is_same_heat_context return True So it exit without warning. I will remove the 'return True' from it. Change-Id: I48d62bd15ec359e2121f236c48d9d349174f2c10 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-03-20Add CPU pinning support for node contextJingLu51-8/+29
JIRA: YARDSTICK-573 Since the yardstick framework now has supported an improved node type context, this patch adds support for VM vcpu pinning ability in the node type context. It provides several scripts that can be used to configurate the controller and compute nodes. Change-Id: If2c6e7b1b85ff78b9d2a5997bf03bdc6877aaf74 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit f138b480ea4c9954d107555d7a46ec3d4375653f)
2017-03-13Bugfix: network_utilization: parse errorchenjiankun1-15/+14
JIRA: YARDSTICK-586 When run tc072, there is a bug: network_utilization: parse error, see the log: ERROR ('network_utilization: parse error', [], [u'05:10:46', u'IFACE', u'rxpck/s', u'txpck/s', u'rxkB/s', u'txkB/s', u'rxcmp/s', u'txcmp/s', u'rxmcst/s', u'%ifutil']) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/runners/duration.py", line 69, in _worker_process method(data) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/scenarios/networking/netutilization.py", line 191, in run result.update(self._get_network_utilization()) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/scenarios/networking/netutilization.py", line 182, in _get_network_utilization result = self._filtrate_result(raw_result) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/scenarios/networking/netutilization.py", line 146, in _filtrate_result fields, line) RuntimeError: ('network_utilization: parse error', [], [u'05:10:46', u'IFACE', u'rxpck/s', u'txpck/s', u'rxkB/s', u'txkB/s', u'rxcmp/s', u'txcmp/s', u'rxmcst/s', u'%ifutil']) Maybe the tool has some changes. Change-Id: I6c4fe3fe9f749ec942fb5fbd799b8f4ab9a5c16c Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-03-09Bugfix: Failed executing command: 'free -s 1 -c 10'chenjiankun1-5/+5
JIRA: YARDSTICK-585 In CI when run tc070, there is a error: Failed executing command: 'free -s 1 -c 10' Here it is the log: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/runners/duration.py", line 69, in _worker_process method(data) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/scenarios/compute/memload.py", line 126, in run result.update(self._get_mem_usage()) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/scenarios/compute/memload.py", line 116, in _get_mem_usage result = self._execute_command(cmd) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/scenarios/compute/memload.py", line 70, in _execute_command cmd, stderr) RuntimeError: ('Failed executing command: ', 'free -s 1 -c 10',u"free: seconds argument `1' failed\n") And it is a bug of free. the -c option should in front of -s, so change the position will solve this problem. Also it has another bug: 'KeyError', there no 'cached' keyword, so I change it to 'buff/cache'. Change-Id: I0ca16e8d8cc11c6a3b2f364cadbdb3ea367eee53 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-03-09Merge "move external_network auto-assign to Heat context"Rex Lee2-14/+15
2017-03-08Bugfix: yardstick will create stacks with the same name when run using API ↵chenjiankun7-109/+130
in parallel JIRA: YARDSTICK-575 Currently yardstick will create stacks with the same name when run using API in parallel. The reason is there is a global variable in context base and the core will always deploy the first context in Context.list. When run in parallel, it will run in the one process. So yardstick will deploy stacks with the same name. The solution is do not use Context.list in yardstick core. And using a local variable instead. BTW, if we use API to call yardstick core, we can not config the output way. So I parse yardstick.conf when task start. And I think we can include scenario_cfg, context_cfg, yardstick_cfg in one config object later so that we can get all config in one object. Change-Id: I1ada4ef486bd252e78c3a2e49c6a39b3f8f16a7c Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-02-28move external_network auto-assign to Heat contextRoss Brattain2-14/+15
if there are no external networks defined then assign the external network to the first network as determined by standard sorting Change-Id: I9d32eca258f8e7de3d44cec4124c0e8c020c0b85 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-26heat: replace dict key checking with .get()Ross Brattain1-9/+6
We init all the fields to None, so the default value is None, which is what .get() returns when the key is not present it the dictionary. Replace if key in dict: self.val = dict[key] with self.val = dict.get(key) This also has the added beneifit of re-initializing default values to None. In idiomatic Python we do not check a dictionary twice if we can avoid it. Either use dict.get() with a default value or catch the KeyError and do the correct thing. Change-Id: If8d1caeb7288f888f02622d62e8db9f59f50717a Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-27Merge "ci in huawei-pod1 do not run test case after tc074"Rex Lee1-1/+5
2017-02-26heat context support affinity and anti-affinityrexlee87762-17/+63
JIRA: YARDSTICK-566 Current Heat context support affinity and availability arguments but not support affinity and anti-affinity. Enhance Heat context to support affinity and anti-affinity: 1. can create heat server group with affinity/anti-affinity 2. each server could be specified which server group they are in Change-Id: I46e7376fd116c6e109cb5dcb1c168460918e6d43 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-02-23Merge "Update missing license headers"Rex Lee15-0/+128
2017-02-21ci in huawei-pod1 do not run test case after tc074chenjiankun1-1/+5
JIRA: YARDSTICK-568 https://build.opnfv.org/ci/view/yardstick/job/yardstick-compass-baremetal-daily-master/814/consoleFull the test case tc075 and tc027 after tc074 does not run in the ci, which is not correct. the logs shows the suite quit after tc074 finishes. The reason is: In this patch: https://gerrit.opnfv.org/gerrit/#/c/26763/ I add a task_id to the context name, but in tc074, it do not have a name. It will cause a keyError. Change-Id: I09608675d9dadcc3ff0d825ca63db3be5e414120 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-02-21improving if conditions :)Deepak S2-5/+5
Change-Id: I2fad46b07b252f898acfe116dd6542946b8a26a8 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-02-17Update missing license headersDeepak S15-0/+128
Change-Id: I063fd37fe25754c94d164ae5a209d15b69322093 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-02-16Merge "Context improvement: add support for configing node environment"Rex Lee2-8/+78
2017-02-16Context improvement: add support for configing node environmentchenjiankun2-8/+78
JIRA: YARDSTICK-556 Currently we do can not config the node environment before heat create a stack. But in lots of scene, we need to config node environment before heat. So I add support for it. Change-Id: Iac1b74dc780eb40e6ab2c9cf04ed14e2b8f91ca8 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-02-16Merge "Bugfix: AttributeError: 'dict' object has no attribute 'encode'"Jing Lu1-3/+19
2017-02-16Merge "New reliability/availability testcase - IP datagram error rate and etc."Rex Lee1-0/+130
2017-02-16Merge "pylint fixes: remove redundant parens, fix comparison order"Rex Lee3-4/+4
2017-02-15Bugfix: AttributeError: 'dict' object has no attribute 'encode'chenjiankun1-3/+19
JIRA: YARDSTICK-557 If we run task with sample/ping.yaml We will encounter below error, here is the log: Traceback (most recent call last): File "/usr/local/bin/yardstick", line 11, in <module> load_entry_point('yardstick==0.1.dev0', 'console_scripts', 'yardstick')() File "/usr/local/lib/python2.7/dist-packages/yardstick/main.py", line 49, in main YardstickCLI().main(sys.argv[1:]) File "/usr/local/lib/python2.7/dist-packages/yardstick/cmd/cli.py", line 167, in main self._dispath_func_notask() File "/usr/local/lib/python2.7/dist-packages/yardstick/cmd/cli.py", line 145, in _dispath_func_notask func(CONF.category) File "/usr/local/lib/python2.7/dist-packages/yardstick/cmd/commands/task.py", line 45, in do_start Task().start(param, **kwargs) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py", line 83, in start self._run(scenarios, run_in_parallel, args.output_file) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py", line 131, in _run runner = run_one_scenario(scenario, output_file) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py", line 410, in run_one_scenario if is_ip_addr(scenario_cfg["target"]): File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py", line 358, in is_ip_addr ipaddress.ip_address(addr.encode('utf-8')) AttributeError: 'dict' object has no attribute 'encode' Change-Id: Iba1570416bd8614e38c9e847de730a31d9ddedc2 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-02-14Update Openstack CLI Command in yardstick ha test framework configuration ↵tjuyinkanglin2-2/+2
files and TC052 JIRA: YARDSTICK-547 Change-Id: Idde2dc56436c9cf4b8696bfd0056ab4e47c97c9a Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2017-02-14Merge "heat: minor fixes, don't use len > 0 and use next instead of [0]"Kubi1-2/+2
2017-02-14Merge "fix super() calls, must use explicit class name"Rex Lee5-7/+7
2017-02-14Merge "more logging fixes"Rex Lee3-23/+21
2017-02-14Merge "heat: convert open to context manager"Rex Lee1-3/+4
2017-02-14Merge "vnf_generic: replace list comprehension with generator expression"Jing Lu1-3/+3
2017-02-13New reliability/availability testcase - IP datagram error rate and etc.JingLu51-0/+130
JIRA: YARDSTICK-534 This test case uses nstat to monitor network metrics provided by the kernel in a host and calculate IP datagram error rate, ICMP message error rate, TCP segment error rate and UDP datagram error rate. Change-Id: I2fe6457bb5c95d0446c1463991ae31cc664b09f8 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-02-09fix super() calls, must use explicit class nameRoss Brattain5-7/+7
self.__class__ is not correct. For Python 2 we have to explicitly use the class name see http://stackoverflow.com/questions/4235078/how-to-avoid-infinite-recursion-with-super Change-Id: I584ca565707b7331c1742fb33c8b524f7b7c9bf9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-07more logging fixesRoss Brattain3-23/+21
don't use .format() with logging, use regular %s logginer formatter Change-Id: I1ce0d81cc3f81c35003ef453e82c57faeb46c49f Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-08pylint fixes: remove redundant parens, fix comparison orderRoss Brattain3-4/+4
removed redundant parens in if and while clauses use var != constant, not constant != var. Python doesn't allow for assignment in if statements, so we don't have to use the old C workarounds remove unwanted commas use raw strings for regexps with backslashes, e.g. r'\s' instead of '\s' Change-Id: I7aad645dd3d7f4b4b62f4e4510a425611c9d28f2 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-08vnf_generic: replace list comprehension with generator expressionRoss Brattain1-3/+3
no need to build a list, just use next Change-Id: I8a899ac538849b765f12bebda4fb8c89c84f333e Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-08vnf_generic: convert sshmanager to classRoss Brattain1-27/+27
@contextmanager have an issue with respect to exceptions that makes them not suitable for real usage. @contextmanager uses yield to create a generator and then uses generator.throw() to raise any exceptions. Exceptions thrown from generators loose their call stack due to the way generators work, so any exception inside a context manager is harder to debug. For this reason we don't use @contextmanager and instead always define a new class with __enter__ and __exit__. There is sample code that demonstrates the issue with @contextmanager and generator.throw() here https://gist.github.com/rbbratta/e28b6e64a4551522c3ac9815ca7f25f0 Change-Id: I5383c01f40a63e33680112f39b5bd9c858e328f1 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-26Merge "Introducing Generic framework to do pre-deployment VNF & Network ↵Kubi1-0/+328
service testing"
2017-01-23Merge "Record task status if running via CLI"Rex Lee1-2/+0
2017-01-20Record task status if running via CLIchenjiankun1-2/+0
JIRA: YARDSTICK-542 Currently we do not record task status when using CLI to run task. So I add this function. If status=0, task is not done. if status=1, task is done. if status=2, there is an error. Change-Id: Ib9b3c8abd233909c04f792115199250419fa8d7a Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-20Create API to get a list of all test caseschenjiankun1-76/+67
JIRA: YARDSTICK-456 Currently we do not have a API to get a list of all test cases; Currently the test case info is from the comment; So I create a API to get a list of all test cases; And create a 'description' attribute to record info of a test case; And use the CLI call this API; Change-Id: Ife800600446683664097835c7b9f11899c85771d Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-20Merge "Bugfix:can not run a test suite if not under yardstick root path"Jing Lu1-0/+2