yardstick.git
6 years agoyardstick env influxdb/grafana cmd support centos 33/37233/3
chenjiankun [Wed, 12 Jul 2017 03:58:58 +0000 (03:58 +0000)]
yardstick env influxdb/grafana cmd support centos

JIRA: YARDSTICK-714

Currently yardstick env influxdb/grafana command do not support centos.
Because we use the gateway ip to get the service of influxdb and grafana.
But in centos, we can not access influxdb/grafana service via gateway ip.
In this patch, I use docker inspect to get the ip of influxdb and grafana.
So these command can support centos.

Change-Id: Ie4abcb8048b92d61bc62777dfc362bb29f354b2b
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
6 years agoMerge "Yardstick api database v2 model"
Jing Lu [Wed, 12 Jul 2017 02:54:02 +0000 (02:54 +0000)]
Merge "Yardstick api database v2 model"

6 years agoYardstick api database v2 model 67/37167/2
chenjiankun [Tue, 11 Jul 2017 09:44:48 +0000 (09:44 +0000)]
Yardstick api database v2 model

JIRA: YARDSTICK-713

We have api v2 for gui, and they are all based on the database model.

Change-Id: I51b127588b0b84316acff8acf4a7886339646060
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
6 years agoMerge "Yardstick API architecture improvement"
Rex Lee [Wed, 12 Jul 2017 01:35:03 +0000 (01:35 +0000)]
Merge "Yardstick API architecture improvement"

6 years agoYardstick API architecture improvement 45/37045/4
chenjiankun [Fri, 7 Jul 2017 03:13:36 +0000 (03:13 +0000)]
Yardstick API architecture improvement

JIRA: YARDSTICK-710

Since we have the plan to upload api v2 and gui.
We need to add put and delete method.
So the architecture need to be improved.

Change-Id: Ie20a79c26ef6c581897ce4e63980fa2895b162d2
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
6 years agoipaddress: don't use backport on python 3 74/36474/2
Ross Brattain [Mon, 26 Jun 2017 04:39:00 +0000 (21:39 -0700)]
ipaddress: don't use backport on python 3

JIRA: YARDSTICK-645

Change-Id: I7b6d4222d58c29a0f5d1817fa84351c0f09404f7
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
6 years agoChange storperf target IP 13/37113/1
JingLu5 [Mon, 10 Jul 2017 04:19:08 +0000 (04:19 +0000)]
Change storperf target IP

As compass in master use OpenStack Ansible, the former IP "192.168.200.1" for
Huawei pod-1 has been deprecated.

Change-Id: Ia60885b36abec3455db2aa2939afbe2ef8bd79f5
Signed-off-by: JingLu5 <lvjing5@huawei.com>
6 years agoMerge "Yardstick install storperf update"
Jing Lu [Mon, 10 Jul 2017 02:20:39 +0000 (02:20 +0000)]
Merge "Yardstick install storperf update"

6 years agoYardstick install storperf update 43/36943/4
JingLu5 [Wed, 5 Jul 2017 03:49:32 +0000 (03:49 +0000)]
Yardstick install storperf update

JIRA: YARDSTICK-702

Sicnce StorPerf has switched to use docker-compose to start container suite.
The way Yardstick install storperf should also be updated.

Change-Id: Idee05703b8ae5cd03bc214f598f56c8ac05ca755
Signed-off-by: JingLu5 <lvjing5@huawei.com>
6 years agoMerge "Improvement: delete stack if create stack failed"
Rex Lee [Thu, 6 Jul 2017 12:21:22 +0000 (12:21 +0000)]
Merge "Improvement: delete stack if create stack failed"

6 years agoMerge "Bugfix: Abnormally stopped background scenario causes test data lost"
Rex Lee [Thu, 6 Jul 2017 12:20:58 +0000 (12:20 +0000)]
Merge "Bugfix: Abnormally stopped background scenario causes test data lost"

6 years agoMerge "move flatten dict key to common utils"
Kubi [Thu, 6 Jul 2017 12:14:34 +0000 (12:14 +0000)]
Merge "move flatten dict key to common utils"

6 years agoImprovement: delete stack if create stack failed 07/37007/4
JingLu5 [Thu, 6 Jul 2017 08:33:17 +0000 (08:33 +0000)]
Improvement: delete stack if create stack failed

JIRA: YARDSTICK-709

If the stack is CREATE_FAILED during the context deployment, the failed
stack should be deleted.

Change-Id: I35b28ffae0f4d1f3ea9809d21add5d718dae5c9d
Signed-off-by: JingLu5 <lvjing5@huawei.com>
6 years agoMerge "Add API to update hosts info about SUT"
Jing Lu [Thu, 6 Jul 2017 08:19:36 +0000 (08:19 +0000)]
Merge "Add API to update hosts info about SUT"

6 years agomove flatten dict key to common utils 35/36935/6
rexlee8776 [Wed, 5 Jul 2017 02:50:06 +0000 (02:50 +0000)]
move flatten dict key to common utils

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>
6 years agoAdd API to update hosts info about SUT 57/36557/6
rexlee8776 [Tue, 27 Jun 2017 07:27:03 +0000 (07:27 +0000)]
Add API to update hosts info about SUT

JIRA: YARDSTICK-674

For some SUT which use domain name as endpoint and AUTH_URL, yardstick
restAPI should support to add "ip domain_name" info into /etc/hosts so
that it can use the ip_address to access the SUT.

api: /yardstick/env/action
description: update hosts info for domain name
method: POST

parameters:
{
    "action": "update_hosts",
    "args": {"opnfv.org": "1.1.1.1",
             "openstack.org": "2.2.2.2"
            }
}

Change-Id: Iee1defaf069ebcb0328a37a659024eabac297482
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
6 years agoMerge "Blacklist TC011 from suites with ODL"
Jing Lu [Thu, 6 Jul 2017 03:59:15 +0000 (03:59 +0000)]
Merge "Blacklist TC011 from suites with ODL"

6 years agoMerge "Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME"...
Kubi [Thu, 6 Jul 2017 03:58:40 +0000 (03:58 +0000)]
Merge "Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absent"

6 years agoMerge "show actual exceptions in task.py"
Kubi [Thu, 6 Jul 2017 03:58:19 +0000 (03:58 +0000)]
Merge "show actual exceptions in task.py"

6 years agoMerge "unify pod keywork so api can easily used"
Kubi [Wed, 5 Jul 2017 02:59:40 +0000 (02:59 +0000)]
Merge "unify pod keywork so api can easily used"

6 years agoMerge "Use "OS_INSECURE" variable as the insecure mode indicator"
Kubi [Wed, 5 Jul 2017 02:58:30 +0000 (02:58 +0000)]
Merge "Use "OS_INSECURE" variable as the insecure mode indicator"

6 years agoBugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absent 97/36897/3
JingLu5 [Tue, 4 Jul 2017 07:44:52 +0000 (07:44 +0000)]
Bugfix: test case constraint not work if "INSTALLER_TYPE" and "NODE_NAME" absent

Change-Id: Idffc07c28fabda590b58c9501f388099f84f06b2
Signed-off-by: JingLu5 <lvjing5@huawei.com>
6 years agosupport segmentation_id for vlan provider network 61/36861/6
JingLu5 [Mon, 3 Jul 2017 10:34:53 +0000 (10:34 +0000)]
support segmentation_id for vlan provider network

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>
6 years agoBugfix: Abnormally stopped background scenario causes test data lost 85/36885/2
JingLu5 [Tue, 4 Jul 2017 05:59:52 +0000 (05:59 +0000)]
Bugfix: Abnormally stopped background scenario causes test data lost

Change-Id: I19b8d1c1c6becf4335537d585046cbd59cab5935
Signed-off-by: JingLu5 <lvjing5@huawei.com>
6 years agoBugfix: background scenario can't not update result 81/36881/1
chenjiankun [Tue, 4 Jul 2017 03:16:55 +0000 (03:16 +0000)]
Bugfix: background scenario can't not update result

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>
6 years agoYardstick: Aarch64 jenkins slave support 41/34841/17
Alexandru Nemes [Tue, 16 May 2017 12:50:27 +0000 (15:50 +0300)]
Yardstick: Aarch64 jenkins slave support

Change-Id: I2d58c38d75fc1fe036769340e9fb02932f543510
Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
6 years agoBlacklist TC011 from suites with ODL 67/36567/5
Alexandru Nemes [Tue, 27 Jun 2017 11:05:07 +0000 (14:05 +0300)]
Blacklist TC011 from suites with ODL

In deployments with ODL, security groups behave badly because of an
IPv6 rule that causes IPv4 packets to be incorrectly routed.
This is described in:
https://jira.opnfv.org/browse/ARMBAND-61
As a consequence, Yardstick TC011 fails because iperf cannot
create a connection.
The proposed solution is to temporarily comment out TC011
from test suites with ODL.
As mentioned here, security groups support for IPv6 is partial:
artifacts.opnfv.org/ipv6/docs/gapanalysis/gap-analysis-odl-boron.html
On nosdn deployments this issue is not reproducing and the test runs ok.

JIRA: ARMBAND-269

Change-Id: Id5fede27262c21d777ec8e9988941643d16f9417
Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
6 years agoBugfix: amend the CLI to build yardstick-image manually 43/36843/2
JingLu5 [Mon, 3 Jul 2017 04:16:14 +0000 (04:16 +0000)]
Bugfix: amend the CLI to build yardstick-image manually

Change-Id: I8fbf0d6383375660c05e55d36fb0d2f91e1d8de8
Signed-off-by: JingLu5 <lvjing5@huawei.com>
6 years agoMerge "Set TEST_DB_URL for storperf"
Jing Lu [Mon, 3 Jul 2017 01:58:44 +0000 (01:58 +0000)]
Merge "Set TEST_DB_URL for storperf"

7 years agounify pod keywork so api can easily used 65/36765/5
rexlee8776 [Fri, 30 Jun 2017 02:02:01 +0000 (02:02 +0000)]
unify pod keywork so api can easily used

JIRA: YARDSTICK-695

Change-Id: I826cb2ea07949b1eaae4df4cb77175ec8f5df89b
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoMerge "Change prepareYardstickEnv to prepare_env and add log info"
Jing Lu [Fri, 30 Jun 2017 06:49:43 +0000 (06:49 +0000)]
Merge "Change prepareYardstickEnv to prepare_env and add log info"

7 years agoUse "OS_INSECURE" variable as the insecure mode indicator 83/36783/2
JingLu5 [Fri, 30 Jun 2017 06:27:23 +0000 (06:27 +0000)]
Use "OS_INSECURE" variable as the insecure mode indicator

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>
7 years agoChange prepareYardstickEnv to prepare_env and add log info 67/36767/4
chenjiankun [Fri, 30 Jun 2017 02:32:55 +0000 (02:32 +0000)]
Change prepareYardstickEnv to prepare_env and add log info

JIRA: YARDSTICK-697

Currently the action in env like prepareYardstickEnv,
createGrafanaContainer, createInfluxDBContainer, this is not python style.
So I do some change:

prepareYardstickEnv->prepare_env
createGrafanaContainer->create_grafana
createInfluxDBContainer->create_influxdb

And also add some log info in env_action.

Change-Id: Ia91576b975f3de76b96e312779fda4911e7cac24
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoAdd API to show test case documentation 91/36691/3
chenjiankun [Thu, 29 Jun 2017 03:38:04 +0000 (03:38 +0000)]
Add API to show test case documentation

JIRA: YARDSTICK-694

We need API to show test case documentation.
API: /yardstick/testcases/<testcase_name>/docs
method: GET

example:
http://192.168.131.2:8888/yardstick/testcases/opnfv_yardstick_tc002/docs

Change-Id: Ib8d591f0ff5f91c4d0a740539727ec73ddd86249
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "Bugfix: remove test.dbf file in recovery script"
Jing Lu [Fri, 30 Jun 2017 02:00:32 +0000 (02:00 +0000)]
Merge "Bugfix: remove test.dbf file in recovery script"

7 years agoBugfix: remove test.dbf file in recovery script 59/36759/1
zshi [Fri, 30 Jun 2017 01:40:58 +0000 (09:40 +0800)]
Bugfix: remove test.dbf file in recovery script

JIRA: YARDSTICK-696

Change-Id: I09b73079ff828c43040723794115bb07f74242e8
Signed-off-by: zshi <zshi@redhat.com>
7 years agoshow actual exceptions in task.py 57/36757/1
Ross Brattain [Wed, 1 Mar 2017 00:36:57 +0000 (16:36 -0800)]
show actual exceptions in task.py

Change-Id: I40bf255ccb844ffa0a151752579b552a285f5e18
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "Call core code directly in the API of run test case"
Rex Lee [Thu, 29 Jun 2017 12:07:27 +0000 (12:07 +0000)]
Merge "Call core code directly in the API of run test case"

7 years agoCall core code directly in the API of run test case 07/36507/3
chenjiankun [Mon, 26 Jun 2017 09:46:24 +0000 (09:46 +0000)]
Call core code directly in the API of run test case

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>
7 years agoAdd API to update pod yaml file 87/36687/2
chenjiankun [Thu, 29 Jun 2017 02:42:56 +0000 (02:42 +0000)]
Add API to update pod yaml file

JIRA: YARDSTICK-693

Apart from API to upload pod yaml file, we also need API to update pod
file.

API: /yardstick/env/action
method: POST
param:
{
    'action': 'update_pod_file',
    'args': {
        'pod': { pod content }
    }
}

Change-Id: I0ba168612ccc2e43c531e4b9253cf72e5c745297
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "Add API to update hosts info about SUT"
Rex Lee [Tue, 27 Jun 2017 07:20:33 +0000 (07:20 +0000)]
Merge "Add API to update hosts info about SUT"

7 years agoSet TEST_DB_URL for storperf 39/36539/2
JingLu5 [Tue, 27 Jun 2017 03:34:49 +0000 (03:34 +0000)]
Set TEST_DB_URL for storperf

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>
7 years agoMerge "increase line length to 99"
Ross Brattain [Mon, 26 Jun 2017 08:53:27 +0000 (08:53 +0000)]
Merge "increase line length to 99"

7 years agoBugfix: remove double quote around SECURE variable 65/36465/2
JingLu5 [Mon, 26 Jun 2017 03:18:56 +0000 (03:18 +0000)]
Bugfix: remove double quote around SECURE variable

JIRA: YARDSTICK-689

This patch remove the double quote around the SECURE varibale as it may cause the fowllowing error:
$ openstack "${SECURE}" image list
openstack: ' image list' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  access token create
  address scope create
  address scope delete
  address scope list
  address scope set
  address scope show
  aggregate add host
  aggregate create
  ...

Change-Id: Ibb22e85b3dd89b0e3b62821bd5ebe4f155886ffc
Signed-off-by: JingLu5 <lvjing5@huawei.com>
7 years agoAdd API to update hosts info about SUT 23/35923/7
rexlee8776 [Mon, 5 Jun 2017 20:31:02 +0000 (20:31 +0000)]
Add API to update hosts info about SUT

JIRA: YARDSTICK-674

For some SUT which use domain name as endpoint and AUTH_URL, yardstick
restAPI should support to add "ip domain_name" info into /etc/hosts so
that it can use the ip_address to access the SUT.

api: /yardstick/env/action
description: update hosts info for domain name
method: POST

parameters:
{
    "action": "update_hosts",
    "args": {"opnfv.org": "1.1.1.1",
             "openstack.org": "2.2.2.2"
            }
}

Change-Id: Iaca9c846f02b1d53e2408d6a21f9201b599717d4
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoMerge "Yardstick output format unified"
Jing Lu [Sat, 24 Jun 2017 09:17:51 +0000 (09:17 +0000)]
Merge "Yardstick output format unified"

7 years agoAdd API to upload pod.yaml file 73/36373/5
chenjiankun [Thu, 22 Jun 2017 13:00:40 +0000 (13:00 +0000)]
Add API to upload pod.yaml file

JIRA: YARDSTICK-687

We need a API to upload a pod.yaml file to /etc/yardstick/pod.yaml.

API: /yardstick/env/action
method: POST
param:
{
    'action': 'upload_pod_file',
    'file': file object
}

Change-Id: I3d25df364da10aaf34f995e948e1704235a40f6f
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "Improve Yardstick user-guide"
Jing Lu [Sat, 24 Jun 2017 03:09:21 +0000 (03:09 +0000)]
Merge "Improve Yardstick user-guide"

7 years agoAdd API to update openrc variable 07/34807/6
chenjiankun [Tue, 16 May 2017 01:59:06 +0000 (01:59 +0000)]
Add API to update openrc variable

JIRA: YARDSTICK-651

Currently we source openrc variable manually or use yardstick env
prepare to get openrc file.
We need API to update the openrc variable.

api: /yardstick/env/action
description: source environment variable
method: POST

parameters:
{
    'action': 'update_openrc',
    'args':{
        'openrc': {
            'OS_USERNAME': 'admin',
            'OS_PASSWORD': 'console',
            'OS_TENANT_NAME': 'admin',
            'OS_AUTH_URL': 'http://192.168.131.222:5000/v2.0',
            'EXTERNAL_NETWORK': 'ext-net'
        }
    }
}

Change-Id: I680a7249116c8ff0c1a9e7d5089538d935240c80
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "improve git code with devstack functions"
Ross Brattain [Fri, 23 Jun 2017 04:11:24 +0000 (04:11 +0000)]
Merge "improve git code with devstack functions"

7 years agoImprove Yardstick user-guide 01/36401/2
JingLu5 [Fri, 23 Jun 2017 03:13:04 +0000 (03:13 +0000)]
Improve Yardstick user-guide

This patch adds a short description on how to use the "yardstick env prepare"
command in a Non-OPNFV installer environtment.

Change-Id: Idf54bf5318499d2b129a1445e0758e351945e755
Signed-off-by: JingLu5 <lvjing5@huawei.com>
7 years agoMerge "auto restart influxdb and grafana support"
Ross Brattain [Thu, 22 Jun 2017 20:51:25 +0000 (20:51 +0000)]
Merge "auto restart influxdb and grafana support"

7 years agoimprove git code with devstack functions 55/36355/6
Ross Brattain [Thu, 22 Jun 2017 05:49:25 +0000 (22:49 -0700)]
improve git code with devstack functions

if we aren't re-cloning we still need to make sure
we update the branch/tag/commit to the version from the remote

so we need to fetch and then checkout again

it is more complicated.  Dockerfile does a shallow
clone, so we don't get all the remote ref information.

To clone a random remote commit id we have to unshallow

Change-Id: If15f504b6ff2cfdfc8894fd3b37e687a19616714
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "Acquire NSB specific data from Heat."
Ross Brattain [Thu, 22 Jun 2017 15:10:21 +0000 (15:10 +0000)]
Merge "Acquire NSB specific data from Heat."

7 years agoMerge "HA testcase improvement"
Kubi [Thu, 22 Jun 2017 13:07:01 +0000 (13:07 +0000)]
Merge "HA testcase improvement"

7 years agoMerge "bugfix: storperf timeout in ci"
Kubi [Thu, 22 Jun 2017 12:58:45 +0000 (12:58 +0000)]
Merge "bugfix: storperf timeout in ci"

7 years agoHA testcase improvement 91/36291/10
JingLu5 [Wed, 21 Jun 2017 10:07:41 +0000 (10:07 +0000)]
HA testcase improvement

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>
7 years agoauto restart influxdb and grafana support 71/36371/1
rexlee8776 [Thu, 22 Jun 2017 12:14:38 +0000 (12:14 +0000)]
auto restart influxdb and grafana support

JIRA: YARDSTICK-686

Change-Id: If486df4d825f9d0b03eeaa77716cc2855e2f1bd0
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agobugfix: storperf timeout in ci 71/36171/2
rexlee8776 [Mon, 19 Jun 2017 06:53:12 +0000 (06:53 +0000)]
bugfix: storperf timeout in ci

JIRA: YARDSTICK-680

Change-Id: Ie405187b8ab085a9e4f40a7e7e7e661c94e83630
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoYardstick output format unified 57/35257/7
chenjiankun [Wed, 24 May 2017 07:22:51 +0000 (07:22 +0000)]
Yardstick output format unified

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>
7 years agoMerge "update requirements.txt for OpenStack Ocata"
Ross Brattain [Thu, 22 Jun 2017 04:17:11 +0000 (04:17 +0000)]
Merge "update requirements.txt for OpenStack Ocata"

7 years agoMerge "ping: don't split if target_vm is a dict"
Ross Brattain [Thu, 22 Jun 2017 02:16:39 +0000 (02:16 +0000)]
Merge "ping: don't split if target_vm is a dict"

7 years agoMerge "cleanup: remove fuel plugin since fuel@opnfv uses mcp"
Ross Brattain [Thu, 22 Jun 2017 01:51:45 +0000 (01:51 +0000)]
Merge "cleanup: remove fuel plugin since fuel@opnfv uses mcp"

7 years agoMerge "temp freeze releng version for stable/danube workaround"
Jing Lu [Thu, 22 Jun 2017 01:50:00 +0000 (01:50 +0000)]
Merge "temp freeze releng version for stable/danube workaround"

7 years agoincrease line length to 99 35/36335/1
Ross Brattain [Thu, 22 Jun 2017 01:00:22 +0000 (18:00 -0700)]
increase line length to 99

When line length is 79 I have to spend too much
time manually wrapping my code into unreadable junk

I can't use expressive tuple unpacking and I start
shortening variables and other bad tricks to decrease
the line length.

We have too many levels of indent to manage with 79

class:
  def:
     if:
         for:
              etc.

Change-Id: Ib2ce9cf887f9880c46815822c8d0e1a7806e53ca
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "heat: use dict literal in init_template"
Ross Brattain [Wed, 21 Jun 2017 09:24:38 +0000 (09:24 +0000)]
Merge "heat: use dict literal in init_template"

7 years agotemp freeze releng version for stable/danube workaround 51/36251/2
Ross Brattain [Tue, 20 Jun 2017 15:29:28 +0000 (08:29 -0700)]
temp freeze releng version for stable/danube workaround

releng doesn't have a branch, so we need to freeze
the releng version.

There is an issue with releng fetch_os_creds.sh change

/home/opnfv/repos/releng/utils/fetch_os_creds.sh: line 75: BRANCH:
unbound variable

So we need to revert back to commit before this change

Change-Id: Ie8b0f68879a873aab584aa32b576d8b5ba602a13
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoping: don't split if target_vm is a dict 29/35129/2
Ross Brattain [Mon, 22 May 2017 08:08:39 +0000 (01:08 -0700)]
ping: don't split if target_vm is a dict

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>
7 years agoAcquire NSB specific data from Heat. 09/30509/31
Edward MacGillivray [Mon, 12 Jun 2017 18:06:45 +0000 (11:06 -0700)]
Acquire NSB specific data from Heat.

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>
7 years agoConfigure Yardstick flavor to give more RAM to ARM instances 79/36179/3
Alexandru Nemes [Mon, 19 Jun 2017 09:04:56 +0000 (12:04 +0300)]
Configure Yardstick flavor to give more RAM to ARM instances

Yardstick TC005 fails with errors that indicate low memory conditions:
"fio: error while loading shared libraries:
librbd.so.1: cannot map zero-fill pages"
Changing the yardstick flavor to give 1024MB of RAM instead of 512MB
made this test case work.

JIRA: ARMBAND-275

Change-Id: I2193802082c28edb20004964d2df3780eb5eccb7
Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
7 years agoheat: use dict literal in init_template 65/30365/4
Ross Brattain [Mon, 13 Feb 2017 19:31:49 +0000 (11:31 -0800)]
heat: use dict literal in init_template

prefer dict literals when possible over increment assignment.

Change-Id: Ia40bbc04eed61feb036a1e9ec3b3110b03c095e1
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agocleanup: remove fuel plugin since fuel@opnfv uses mcp 41/36141/1
Guo Ruijing [Fri, 16 Jun 2017 01:10:19 +0000 (18:10 -0700)]
cleanup: remove fuel plugin since fuel@opnfv uses mcp

Change-Id: Ic9fb9db5c5af517cec1e60740ce5a8fe0572c5bf
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
7 years agoMerge "Fix configuration error in TC025"
Ross Brattain [Thu, 8 Jun 2017 09:58:42 +0000 (09:58 +0000)]
Merge "Fix configuration error in TC025"

7 years agoMerge "Adapt lmbench scripts for aarch64 nodes"
Ross Brattain [Thu, 8 Jun 2017 09:56:02 +0000 (09:56 +0000)]
Merge "Adapt lmbench scripts for aarch64 nodes"

7 years agoBugfix: load_image will move image file if image already exist in /home/opnfv/images 67/35867/1
chenjiankun [Wed, 7 Jun 2017 12:33:31 +0000 (12:33 +0000)]
Bugfix: load_image will move image file if image already exist in /home/opnfv/images

JIRA: YARDSTICK-678

Currently if yardstick-image exist in /home/opnfv/images, load_image.sh
script will not build image, but this script will remove it. We should not
remove the image file which user offer.

Change-Id: I74ff6717606ff1dd9eacde4142e62d3923394baa
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoFix configuration error in TC025 75/35175/4
tjuyinkanglin [Tue, 23 May 2017 06:05:14 +0000 (14:05 +0800)]
Fix configuration error in TC025

JIRA: YARDSTICK-647

Change-Id: Idc2a87d20a631c37f151cc945de155ef8855e9c3
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
7 years agoAdapt lmbench scripts for aarch64 nodes 19/35719/5
Alexandru Nemes [Fri, 2 Jun 2017 10:26:30 +0000 (13:26 +0300)]
Adapt lmbench scripts for aarch64 nodes

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>
7 years agofix No handler warning by calling _init_logging 05/35805/3
Ross Brattain [Tue, 6 Jun 2017 06:59:25 +0000 (23:59 -0700)]
fix No handler warning by calling _init_logging

No handlers could be found for logger

It looks like we need to call _init_logging
to properly setup the logging during unittests.

This should fix the influxdb unittest warning.

JIRA: YARDSTICK-506

Change-Id: I57f6e4088005a691d6587fc68b85455ff257a66c
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoupdate requirements.txt for OpenStack Ocata 03/35803/2
Ross Brattain [Wed, 22 Mar 2017 03:29:17 +0000 (20:29 -0700)]
update requirements.txt for OpenStack Ocata

add shade for ansible

update other versions to make OpenStack Ocata upper-contraints.txt

sort file using C.UTF-8 locale as OpenStack does.
C.UTF-8 locale sorts Upper-case before lower-case.

Change-Id: Ia20eaa2b024be5cc8595873b8cc5dcba5f25d10b
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "utils: make module import safer"
Ross Brattain [Mon, 5 Jun 2017 08:31:46 +0000 (08:31 +0000)]
Merge "utils: make module import safer"

7 years agoMerge "Added arm condition in install.sh to avoid installation error on ubuntu."
Rex Lee [Mon, 5 Jun 2017 08:31:01 +0000 (08:31 +0000)]
Merge "Added arm condition in install.sh to avoid installation error on ubuntu."

7 years agoMerge "Pass parameters between scenarios"
Rex Lee [Mon, 5 Jun 2017 01:20:33 +0000 (01:20 +0000)]
Merge "Pass parameters between scenarios"

7 years agoutils: make module import safer 55/35755/1
Ross Brattain [Mon, 22 May 2017 04:08:49 +0000 (21:08 -0700)]
utils: make module import safer

If a module fails to import, then ignore it
and try the next module.

This can help if certain module depenencies
aren't installed, e.g. TREX.

Change-Id: I2bc4384429fabd61cd430817489cb2f3c86fe9b2
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "Bugfix: AttributeError when run tc055"
Ross Brattain [Thu, 1 Jun 2017 15:25:07 +0000 (15:25 +0000)]
Merge "Bugfix: AttributeError when run tc055"

7 years agoAdd a new runner to do binary search for max PPS 73/33073/6
Jing Zhang [Thu, 6 Apr 2017 13:38:20 +0000 (09:38 -0400)]
Add a new runner to do binary search for max PPS

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>
7 years agoImporve monitor_process pass criteria 29/35329/15
JingLu5 [Thu, 25 May 2017 08:48:15 +0000 (08:48 +0000)]
Imporve monitor_process pass criteria

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>
7 years agoMerge "This is the vote for yardstick new PTL"
Kubi [Sat, 27 May 2017 06:22:25 +0000 (06:22 +0000)]
Merge "This is the vote for yardstick new PTL"

7 years agoBugfix: AttributeError when run tc055 89/35389/2
chenjiankun [Fri, 26 May 2017 06:52:07 +0000 (06:52 +0000)]
Bugfix: AttributeError when run tc055

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>
7 years agoPass parameters between scenarios 33/35333/3
chenjiankun [Thu, 25 May 2017 09:19:04 +0000 (09:19 +0000)]
Pass parameters between scenarios

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>
7 years agoAdded arm condition in install.sh to avoid installation error on ubuntu. 87/35287/2
Maciej Skrocki [Tue, 16 May 2017 20:58:41 +0000 (13:58 -0700)]
Added arm condition in install.sh to avoid installation error on ubuntu.

Change-Id: Iaa07a8d68a7dede6f2b42440be44ed07f035b1ca
Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com>
7 years agoTerminate openstack service process using kill command in HA test cases 03/35303/2
JingLu5 [Thu, 25 May 2017 03:58:52 +0000 (03:58 +0000)]
Terminate openstack service process using kill command in HA test cases

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>
7 years agofix bug: multi monitor 51/35251/6
HuanLi [Wed, 24 May 2017 03:58:00 +0000 (11:58 +0800)]
fix bug: multi monitor

JIRA: YARDSTICK-657

Change-Id: I77223cc43d529828cf3f763529019590c35b2fcb
Signed-off-by: HuanLi <lihuansse@tongji.edu.cn>
7 years agoThis is the vote for yardstick new PTL 41/35141/1
kubi [Mon, 22 May 2017 12:43:41 +0000 (20:43 +0800)]
This is the vote for yardstick new PTL

Ross Brattain who is yardstick commtter has been nominated as
new PTL candidate before the nomination end date. As we only
have one candidate, we will use gerrit to vote instead of civs

all yardstick committers, please vote +2 or -2 before this friday
the vote will be closed at that time

Reference: https://wiki.opnfv.org/display/yardstick/Yardstick+PTL+Election

Change-Id: I561f70051ed2593581ab909f08bd8be88c5b0e77
Signed-off-by: kubi <jean.gaoliang@huawei.com>
7 years agoMerge "Added PyCharms files to gitignore."
Rex Lee [Mon, 22 May 2017 00:57:47 +0000 (00:57 +0000)]
Merge "Added PyCharms files to gitignore."

7 years agoMerge "increase monitor number in cases."
Rex Lee [Sat, 20 May 2017 02:01:11 +0000 (02:01 +0000)]
Merge "increase monitor number in cases."

7 years agoincrease monitor number in cases. 37/34837/4
HuanLi [Tue, 16 May 2017 10:23:29 +0000 (18:23 +0800)]
increase monitor number in cases.

change cases to multi-monitor mode and improve monitor accuracy.

JIRA: YARDSTICK-397

Change-Id: I6840423dd83899b769df76fbee808f9bf5dc4cfd
Signed-off-by: HuanLi <lihuansse@tongji.edu.cn>
7 years agoAdded PyCharms files to gitignore. 59/34859/2
Maciej Skrocki [Tue, 16 May 2017 20:44:18 +0000 (13:44 -0700)]
Added PyCharms files to gitignore.

Change-Id: I09e9aedd80262cf75b0c0549552fc90517a24bf0
Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com>
7 years agoBumped ansible version to 2.2.2. 57/34857/2
Maciej Skrocki [Tue, 16 May 2017 20:40:27 +0000 (13:40 -0700)]
Bumped ansible version to 2.2.2.

Change-Id: Ibdf633bd475cc295f53e8236b1938a3354cb4f99
Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com>
7 years agofix multi-monitor unitest hang 65/34865/1
Ross Brattain [Tue, 16 May 2017 22:39:42 +0000 (15:39 -0700)]
fix multi-monitor unitest hang

need to mock SSH.from_node().execute.return_value
because we switch most SSH calls to use from_node()
factory function

Change-Id: Ibea525c2fcc243d41de8ccbcd40bc98532d69006
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoBugfix: change monitor command in tc019 17/34817/1
JingLu5 [Tue, 16 May 2017 05:21:13 +0000 (05:21 +0000)]
Bugfix: change monitor command in tc019

JIRA: YARDSTICK-655

The original openstack command used for monitoring high availability openstack
nova-api service in tc019 is "nova image-list", the "openstack image list" command
used in tc019 now may not correctly show the nova-api service status.
This is patch swtich the monitor command to "openstack server list".

Change-Id: I8810f28b4328ceb4d911a3041a24774ae9cae8f0
Signed-off-by: JingLu5 <lvjing5@huawei.com>