aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
AgeCommit message (Collapse)AuthorFilesLines
2017-07-17Merge "attacker_process: fix typo s/envrioment/environment/"Rex Lee1-2/+2
2017-07-17Merge "Bugfix: kubernetes context do not implement _get_network"Jing Lu1-0/+3
2017-07-17Bugfix: kubernetes context do not implement _get_networkchenjiankun1-0/+3
Since kubernetes context do not implement _get_network, so when run unit test case, we will get a error: TypeError: Can't instantiate abstract class KubernetesContext with abstract methods _get_network Change-Id: Ib56abe7c580ef8a6fc9f52f3fcd566d0fa70e1cc Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-17Merge "test_attacker_baremetal: don't run local commands"Ross Brattain1-4/+1
2017-07-17Merge "Kubernetes (k8s) support"Jing Lu1-0/+137
2017-07-17Merge "add network info to topology"Rex Lee8-93/+288
2017-07-17Kubernetes (k8s) supportchenjiankun1-0/+137
JIRA: YARDSTICK-682 We decide to support k8s in E release. We need to discuss with openretriver team and then rewrite the ping test case under k8s as the first step. Change-Id: I3f81ebca8de5c1f3a8b7d42581cd7342dc320239 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-14attacker_process: fix typo s/envrioment/environment/Ross Brattain1-2/+2
Change-Id: I1e5db657eb88c73b5d9223c47e2d97dc79eec1f1 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_attacker_baremetal: don't run local commandsRoss Brattain1-4/+1
these tests were failing to mock subprocess.check_output and thus were trying to run sudo commands on the local system. This is dangerous. Add the subprocess mock. Also mock the LOG object so we don't print bogus Runtime error tracebacks in the unittest logs when we test assertRaises() Change-Id: I01535f9952fbd95ce2f5972b641c51ff836e7e8c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_monitor_command: mock LOG so we don't output errorRoss Brattain1-4/+1
Don't print fake tracebacks to the unittest logs Change-Id: I8a468b8c6566f02be88a9dd222567c14c66b0956 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13add network info to topologyRoss Brattain8-93/+288
we need to know which network each port is connected to so we can find VLAN or VXLAN ID. To do this we implement a new method for Contexts, Context.get_network(). This method is similar to Context.get_server(), it searches for a given network name in all the contexts. From this we generate a context_cfg["networks"] dict that stores all the network info for the nodes in the scenario. Then when we generate the topology for VNFD, we can lookup a given network by the vld_id and get the network_type, segmentation_id, etc. Then if we need to for example generated traffic on a given VLAN or VXLAN, we have this info available. Define default nd_route_tbl for ACL VNF we need default empty nd_route_tbl for IPv6 route. Change-Id: I9f9cfbd6acabeb4ae4675ca7354390efa57b29e7 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-07-06Merge "Bugfix: Abnormally stopped background scenario causes test data lost"Rex Lee1-4/+0
2017-07-06Merge "move flatten dict key to common utils"Kubi4-13/+21
2017-07-06move flatten dict key to common utilsrexlee87764-13/+21
So it can easily be used by other testcase to unify result JIRA: YARDSTICK-702 Change-Id: Id4fde38a9a0c2a87a6c870bdb7b0c8f3a3b371ac Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-07-06Merge "Bugfix: test case constraint not work if "INSTALLER_TYPE" and ↵Kubi1-3/+3
"NODE_NAME" absent"
2017-07-05Merge "unify pod keywork so api can easily used"Kubi1-1/+1
2017-07-05Merge "Use "OS_INSECURE" variable as the insecure mode indicator"Kubi4-5/+5
2017-07-04Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absentJingLu51-3/+3
Change-Id: Idffc07c28fabda590b58c9501f388099f84f06b2 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-04support segmentation_id for vlan provider networkJingLu52-1/+3
If a network specified in the test case is a vlan provider network, new attribute "segmentation_id" can be used to specify the desired vlan tag in the test case network section: networks: test-net: cidr: '192.168.1.0/24' provider: "vlan" physical_network: 'physnet1' segmentation_id: "1000" If the "segmentation_id" attribute is absent, a random vlan tag will be allocated to the network. Change-Id: Ic53852447a3c1bd8feb9ebd42d35f1ade3684be1 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-04Bugfix: Abnormally stopped background scenario causes test data lostJingLu51-4/+0
Change-Id: I19b8d1c1c6becf4335537d585046cbd59cab5935 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-04Bugfix: background scenario can't not update resultchenjiankun1-2/+4
JIRA: YARDSTICK-700 In this patch: https://gerrit.opnfv.org/gerrit/#/c/35257/ In yardstick/benchmark/core/task.py We update background result only when it be stopped abnormally. We need move it out of 'if' statement. Change-Id: I25b76e160273a87da66098565a16e4a143cec11f Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-03Merge "Set TEST_DB_URL for storperf"Jing Lu1-1/+13
2017-06-30unify pod keywork so api can easily usedrexlee87761-1/+1
JIRA: YARDSTICK-695 Change-Id: I826cb2ea07949b1eaae4df4cb77175ec8f5df89b Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-06-30Use "OS_INSECURE" variable as the insecure mode indicatorJingLu54-5/+5
Now we use "OS_CACERT" as the insecure mode indicator, it is better to use "OS_INSECURE". Change-Id: I1406193e27510390b4b8fd8f4751d8361560172f Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-30Merge "Bugfix: remove test.dbf file in recovery script"Jing Lu1-1/+1
2017-06-30Bugfix: remove test.dbf file in recovery scriptzshi1-1/+1
JIRA: YARDSTICK-696 Change-Id: I09b73079ff828c43040723794115bb07f74242e8 Signed-off-by: zshi <zshi@redhat.com>
2017-06-29Call core code directly in the API of run test casechenjiankun3-3/+10
JIRA: YARDSTICK-688 We need to call core code directly in the API of runTestCase. It would be more stable. Change-Id: I431a85ded7cd3b20da0462f947c25d91bb99decd Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-27Set TEST_DB_URL for storperfJingLu51-1/+13
JIRA: YARDSTICK-692 add the URL for the test results DB to the storperd_admin-rc TEST_DB_URL=http://testresults.opnfv.org/test/api/v1 Also, add metadata JSON to the POST to /job API when creating the job: Change-Id: Ib950f759d80e707bc49d9015bc120d985051f131 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-24Merge "Yardstick output format unified"Jing Lu6-106/+116
2017-06-22Merge "Acquire NSB specific data from Heat."Ross Brattain4-41/+171
2017-06-22Merge "HA testcase improvement"Kubi8-8/+52
2017-06-22HA testcase improvementJingLu58-8/+52
This patch improve HA test case in the following aspects: 1. the "GeneralHA" type now will check if the target service process in the controller node. 2. support ignore server certificate 3. add debug log for recovering service failed 4. improve method to kill keystone process Change-Id: I9ae7ab54391fe41d5d7f3e4951a7ac2e3ba75968 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-22Yardstick output format unifiedchenjiankun6-106/+116
JIRA: YARDSTICK-658 Currently the yardstick have three dispatcher: file, influxdb, mongodb. (influxdb using API to get result and mongodb using testAPI to get result) But their output format is different. It is hard to use. In this patch, make all dispatchers using the same data source. And make the output format of file and influxdb unified. As for mongodb, since it is related to testAPI, so I make it push data every test case. The unified output format is: http://paste.openstack.org/show/610125/ Change-Id: I854ac4f03e6f904469b07b0c924c7d850545ae5b Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-20ping: don't split if target_vm is a dictRoss Brattain1-1/+4
If we run sample/ping-hot.yaml, it will encounter an AttributeError, log see below: 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/ping.py", line 94, in run target_vm_name = target_vm.split('.')[0] AttributeError: 'dict' object has no attribute 'split' Because here host and target will be a dict JIRA: YARDSTICK-561 Change-Id: I4b7628bf20050d6d516a80efe3785f750d27c05e Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-06-20Acquire NSB specific data from Heat.Edward MacGillivray4-41/+171
First we add mac_address, subnet_cidr to Heat template outputs Then we convert those into a form for NSB and add vld_id. NSB also requires PCI Bus ID, kernel driver and dpdk_port_num. We get this by ssh-ing into instance and dumping sysfs We also need to fix allow for ssh key auth, and implement relative path file loading so NSB can find all its YAML files JIRA: YARDSTICK-580 Change history: don't hide heat create tracebacks we need tracebacks for debug vnf_generic: add task_path to scenario so we can load relative paths for vnf_generic we want to be able to load yaml relative to the task path For example: traffic_profile: ../../traffic_profiles/fixed.yaml topology: ping_tg_topology.yaml # TODO: look in relative path where the tc.yaml is found These need to be relative to samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml Add a scenario["task_path"] entry heat: log actual exception vnf_generic: replace list with set and iterate over values() some general refactors to remove redundact lookups and type conversions heat: provide mac_address, device_id and network_id from outputs We may need more information to dynamically determine test topology. Towards this end return more info in the heat template. We can return mac_address, device_id and network_id. Once we have this info we can add it to the context_cfg as an interfaces dict. add sample vnf ping multi-network test this test requires 3 network, one for mgmt and the other two for NSB traffic tests We have to make sure we don't use DPDK on mgmt interface because DPDK unbinds the driver heat: convert networks to OrderedDict so we can lookups networks as well as iterate over them in consisitent order heat: and vld_id to networks for vnf_generic vnf_generic uses vld_id Virtual Link Descriptor ID to identify interfaces Add the key to the networks dict and store in Networks object implement relative path file loading in vnf_generic in multiple places we need to load a file relative to the task path, so add open_relative_file_path and modify load_vnf_model to include the scenario_cfg parameter so we have access to task_path DRAFT: heat timeout support Heat stack in CI job failed due to some Nova issue. But then apparently yardstick kept running and took 180mins to timeout https://build.opnfv.org/ci/view/bottlenecks/job/bottlenecks-compass-posca_stress_ping-baremetal-daily-master/16/console We can add a Heat create timeout and fail faster if there is an error. The question is how long should we wait for a Heat stack to deploy. We can set a default and allow override in the heat context config, if users make complicated stacks heat: get netmask and gateway from heat outputs we have do some tricky business with finding the subnet cidr and converting it into netmask vnf_generic: get vpci, driver and dpdk_port_num use a big old find command to dump all the sysfs netdev info nicely. This was re-used from autotest FCoE tests. r"""find /sys/devices/pci* -type d -name net -exec sh -c '{ grep -sH ^ \ +$1/ifindex $1/address $1/operstate $1/device/vendor $1/device/device \ +$1/device/subsystem_vendor $1/device/subsystem_device ; \ +printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \ +' sh \{\}/* \; This finds all PCI devices that are network devices, then dumps all the relevant info using /bin/sh. Then we parse this into a 'netdevs' dict inside the node_dict and also convert into VNF fields we need. vnf_generic: set node name for kpis node is a dict, so we have to use node_name vnfdgen: we CANNOT use TaskTemplate.render because it does not allow for missing variables, we need to allow password for key_filename to be undefined remove default ssh password hack, once rendering is fixed add new example tc_external_ping_heat_context Change-Id: If1fe0c1a2ab0a5be17e40790a66f28f706fa44d6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-06-06Adapt lmbench scripts for aarch64 nodesAlexandru Nemes3-4/+21
LMBench shell scripts were invoking x86_64 executables. This made them fail when executed on aarch64 nodes. Added architecture detection and proper command call. JIRA: ARMBAND-268 Change-Id: I8c9e87158631f7f5479adc2fda9558f9f7e54406 Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
2017-06-05Merge "Pass parameters between scenarios"Rex Lee6-12/+48
2017-06-01Merge "Bugfix: AttributeError when run tc055"Ross Brattain1-3/+7
2017-05-31Add a new runner to do binary search for max PPSJing Zhang1-0/+169
A run consists of multiple (configurable) iterations. The first iteration starts from a configured packet rate. The subsequent iterations start from the observed rate from the previous run. An iteration is a binary search for maximum pps while not exceeding 10-6 packet loss rate. The upper rate is capped to the last pps when packet loss target is missed, the bottom rate is capped to the last pps when packet loss target is met. An iteration stops when the upper rate and the lower rate are close enough (configurable) or the received rate is well below the sending rate. The output observed rate is set to the bottom rate. Update-1: local run of run_tests.sh is good, but two lines are reported by Jekins as too long Update-2: Minor fix to cope with "pps" is not defined in test case yaml file. Update-3: Add pragma to skip unit test for this patch. JIRA: YARDSTICK-613 Change-Id: I2411b173d18d928cc1cf08f883b08bc13a125ea2 Signed-off-by: Jing Zhang <jing.c.zhang@nokia.com>
2017-05-27Imporve monitor_process pass criteriaJingLu57-15/+37
JIRA: YARDSTICK-660 The monitor func()'s criteria in the monitor_process.py now is whether at least one process of the specific controller node service is recovered. But in reality is more resonable to use whether processes have been recoverd to it's original amount. This patch is aiming at improving the isssue Change-Id: I950ce2a89555801b96092735b0d670e892049927 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-05-26Bugfix: AttributeError when run tc055chenjiankun1-3/+7
JIRA: YARDSTICK-662 When I run tc055, I got an error, see log: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/runners/iteration.py", line 46, in _worker_process initial_rate = options_cfg.get("rate", 100) AttributeError: 'NoneType' object has no attribute 'get' This is because in the former patch, we get 'options' by scenario_cfg['options'], it is unsafe since some test case do not have 'options' field. For tc055, 'options' is None. Change-Id: I18a4a7954c18c609f422da403fe65c4739c93648 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-05-26Pass parameters between scenarioschenjiankun6-12/+48
JIRA: YARDSTICK-641 Allowing parameters to pass between scenarios so that the one test case can be combination of several scenarios. Change-Id: I55a00855e77d5b719a27a069a3ea195d6bbd0ef8 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-05-25Terminate openstack service process using kill command in HA test casesJingLu51-2/+5
JIRA: YARDSTICK-659 In some openstack environment, the service process cannot be killed by killall command but can be terminate by kill command. This patch is about to switch to use kill command in the fault_process_kill.bash to kill processes. Change-Id: Iec455ee56d3f31fb5c16de5994870d1acd33f41a Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-05-24fix bug: multi monitorHuanLi1-6/+15
JIRA: YARDSTICK-657 Change-Id: I77223cc43d529828cf3f763529019590c35b2fcb Signed-off-by: HuanLi <lihuansse@tongji.edu.cn>
2017-05-16Merge "Add a new monitor type: MultiMonitor that can run any number of other ↵Ross Brattain2-0/+78
monitors at the same time."
2017-05-12Create flavor from heat contextDanielMartinBuckley2-6/+30
JIRA: YARDSTICK-582 Create a customizable flavor via heat context. All heat parameters are configurable including Core Affinity. The default flavor name is XXXX-flavor where XXXX is stackname. Flavor attributes are taken from the heat context file. If a flavor attribute is not used it takes default attribute value. If flavor name is not specified it uses the server name + "-flavor" or stack-name + "-flavor". Compute node specific attributes are configurable via "extra_specs" attribute. See https://docs.openstack.org/admin-guide/compute-flavors.html for details. Change-Id: If4015970b889b0b95bfa8eba9491ebf31e92f2c7 Signed-off-by: DanielMartinBuckley <daniel.m.buckley@intel.com>
2017-05-11Merge "Extend TC008 to run pktgen-dpdk inside VM Need a fast path inside VM ↵Rex Lee4-28/+498
to verify full throughput of SRIOV and OVS-dpdk."
2017-05-11Merge "KVMFORNFV: Suppress tracing with breaktrace option "Jing Lu1-1/+1
2017-05-10Merge "pass user_data to heat template"Ross Brattain1-0/+4
2017-05-09KVMFORNFV: Suppress tracing with breaktrace option kalyanreddy1-1/+1
This patch is used to suppress tracing while executing cyclictest with breaktrace option as breaktrace parameter will enable the ftrace by default. Change-Id: I776953d8cd56722b7c0f697b12b09051021334fb Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>