aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally/rally.py
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15Update linters and fix all new issuesCédric Ollivier1-30/+34
It mostly add encoding in open calls and leverage f-strings. Change-Id: Ifead18fc724a452c1067dcf91dc577032edc9c59 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-08-18Update to Alpine 3.14Cédric Ollivier1-37/+32
It also fixes lots of new pylint warnings. Change-Id: I3376aee5649596c53bc2941ad4d8e0674a2967fe Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-11-26Remove former allow_no_fip logicCédric Ollivier1-1/+0
Change-Id: Ie6e45572e98108fca114a1d798f2d2a99ad41299 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-11-18Use EXTERNAL_NETWORK as a fallback if no tenant networkCédric Ollivier1-1/+8
It pleases the networking configuration proposed by Airship. Change-Id: I24bc4613557c61db93d543cde730cd872e0176e0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-07-23Add VMTasks.dd_load_test in Rally test casesCédric Ollivier1-1/+4
It allows running dd in VM (simple disk benchmarking). https://github.com/cntt-n/CNTT/issues/1477 Change-Id: I4f1150637460f6e0b661fc80fec2cc292efcc511 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-06-15Stop leveraging on neutron plugins and extraCédric Ollivier1-20/+0
Neutron leverages on the upstream Rally task in Stein and newer. Leveraging on the upstream task may fix the side effects which sometimes occured on Vmtp and Shaker [1] and filled better the CNTT model. [1] https://build.opnfv.org/ci/view/functest/job/functest-hunter-daily/574/ Change-Id: I5ee2e3a3ca956cf57365bf4579534177e87dc08b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-17Fix details in RallyCédric Ollivier1-5/+4
self.details is now a dict and summary is located under root [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-smoke-hunter-rally_sanity-run/422/console Change-Id: Ic89e674b2f6660704b9dafe6070a224753e2af46 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-11Leverage on Rally task tagsCédric Ollivier1-23/+20
It avoids parsing rally task outputs which may hang (subprocess communicate) as seen in rally_full and rally_jobs. It simply selects test names as tags. Change-Id: I88b54a8f155e557f8a606fdbd7d86c1f4d5dae3b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-08Count all hypervisors by defaultCédric Ollivier1-1/+1
If one hypervisor is down, few tempest test fails. User is free to set SKIP_DOWN_HYPERVISORS if it's down on purpose. Change-Id: I7b6a4d0d8f67755d8c1550fd1bc6fd707634f68b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-01Merge "Count all active hypervisors"Cedric Ollivier1-1/+1
2019-09-30Count all active hypervisorsCédric Ollivier1-1/+1
Else tempest_slow fails if one hypervisor is down (detected in ONAP Openlab). It also improves Shaker, Rally and Vmtp which count them. Change-Id: Iee7c20e0357d9237501c5c451580d8f6409ac86b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-29List services via OS_INTERFACE in RallyCédric Ollivier1-1/+2
Rally now leverages on list_services as proposed in utils [1] [1] https://git.opnfv.org/functest/commit/?id=0837a745c81ed2a6e7df097f60d227d5997c805e Change-Id: Ib17f9b530c2933d4a49eb5b744c2ae80b24ad560 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-28Allow getting service via any endpointCédric Ollivier1-0/+1
It overrides the default implementation provided by Shade. Change-Id: I3ad2f8ba543be4483f108c4bd7765018dddc5b19 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-04Prevent occasional rally hangsJuha Kosonen1-8/+13
Set timeout on subprocess invocation instead of spawned child process. Increase the timeout value for rally_full to 2h since the execution typically takes ~90min [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-benchmarking-latest-rally_full-run/22/ Change-Id: I0ca90bc2d85b4625336eb0396d8b2816a486b746 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2019-08-26Protect vs rally infine loopCédric Ollivier1-2/+6
It calls timeout (1 hour) to stop any hanging task [1]. It will be backported to Hunter and Iruya if similar failures are detected. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-benchmarking-latest-rally_full-run/9/console Change-Id: I8fe89f9fa1c6c39cd8810096c1d586bdef7865a0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-08-15Fix rally task file manipulationJuha Kosonen1-11/+11
Remove empty workload entries when applying blacklist in RallyJobs. Rally considers task file as invalid if it contains entries whose workload list empty. Change-Id: I34867c0aeea9c5ecf1294959d680e6de535be9cd Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2019-07-27Switch to Python 3.7 and Alpine 3.10Cédric Ollivier1-49/+50
It also allows building docs as doc8 is broken due to latest OpenStack's upper-constraints. pylint is updated to 2.3.1 (lastest py3.7 version) It disables perm as umask is currently false on lf-virtual1. Change-Id: If09d4796d48b7d0591e7926621d3bbf5ca1b6c24 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-10Allow scenarios without external networkCédric Ollivier1-0/+3
It allows creating testcases leveraging on Functest scenarios without external network. Then Rally can verify network providers by only skipping NovaServers.boot_server_associate_and_dissociate_floating_ip Change-Id: I07a9348214f7557195c7201466f7e37b2b980206 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-06-28Add Barbican scenario in RallyCédric Ollivier1-1/+1
It doesn't run BarbicanSecrets.create_symmetric_and_delete which is currently failing [1]. Barbican testing is optional as Gnocchi. [1] https://bugs.launchpad.net/rally/+bug/1819285 Change-Id: I9121ce3c9f29ba05069c905325327d4c4d0b9e71 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-06-28Add swift scenario in rallyCédric Ollivier1-1/+1
As for refstack_object, it forces swift in SUT. Role is hardcoded to admin as for a few Neutron tests. Change-Id: I0ae823fc8f31016d37831a82f7a50e92b2ed5f58 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-06-09Conform with latest Neutron rally jobCédric Ollivier1-1/+3
The last commit requires two additional task args [1][2]. [1] https://github.com/openstack/neutron/commit/ccef17605d1e28c418821c2235ba24c15893fff2#diff-720114afabbecd64333f4586a338f749 [2] https://build.opnfv.org/ci/job/functest-opnfv-functest-benchmarking-latest-rally_jobs-run/145/console Change-Id: I4943f737be29bcadfead427a7852964e6438a018 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-06-02Publish rally logsCédric Ollivier1-0/+32
Both Rally and Tempest publish Rally debug logs. It also moves the logics from tempest to rally. Change-Id: I5c057d830202baddd73577ade1b09ce304e3c5a5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-25Set utf-8 in decode and encode callsCédric Ollivier1-9/+9
It eases backporting in iruya and hunter as a few logs can't be decoded as ascii [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-iruya-juju_epc-run/56/console Change-Id: I52a6f9a25130cbf62e8ce3b9972064ab73177665 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-24Decode Bytes in logging callsCédric Ollivier1-7/+7
It fixes a few incorrect types in log calls [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-latest-daily/163/ Change-Id: I01790f6454694f434d31366f9c1cf9d98ff5a9cf Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
2019-05-13Update to Python3Cédric Ollivier1-6/+6
Functest containers leverage on Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html It also updates robotframework librairies to latest release and Vmtp to master ([1] is needed) It patches cloudify rest client to support python3. Vmtp is currently disabled because it currently supports python2 only. [1] https://github.com/openstack/vmtp/commit/a5d062881d91bf4f547d92c6e289bea30feb5d6e#diff-b4ef698db8ca845e5845c4618278f29a Change-Id: I39964a212ec2d4dbf53c9ea7c63f02e0b6a05b48 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-02Manage block_migration in RallyCédric Ollivier1-0/+3
It creates a new env var BLOCK_MIGRATION (True by default) to allow block migration for live migration in Rally. It updates scenarios and blacklisting to take that env vars into account. Change-Id: I41129432798ae9e40fe23bbe2c2162df4c0dff80 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-24Refactor modules to avoid duplicated codeCédric Ollivier1-12/+1
It also increases number of lines to warm about duplicated codes. Change-Id: I3914da8a90cbfe8fd024e9944c3adc8a617330d3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-09Set cinder service type in rally testsJuha Kosonen1-0/+4
As a precondition for executing scenarios requiring volume, Rally expects the presence of service named as "cinder". In a case when there is only cinderv2 and cinderv3 configured in the system, Rally fails to validate a testcase even the volume service is working ok. Testcases in question changed to use v3. Change-Id: I42e7f846e80d3647df274b2e03add94c9f0a34d6 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2019-02-15Enrich Rally results outputStamatis Katsaounis1-1/+15
This patch adds success/failure information of rally test cases to summary output. Change-Id: Ie4f9b4972a26e187bb7afdddfd5ce51b16f3db12 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-14Generate xunit reports (rally and tempest)Cédric Ollivier1-8/+85
It adds xunit reports for rally-based and tempest-based testcases. It completes the reports provided by snaps (thanks to Xtesting). All rally related operations are moved to rally. It allows removing the rally dependency to tempest which was false. Change-Id: Ia7d2476f58f4f68b7c88442e50cad844037a36e9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-13Specify which rally tests to runStamatis Katsaounis1-18/+14
This patch adds the ability to specify which rally test to run by setting the appropriate configuration value. Change-Id: I6cbc9d12aada4f8eab68d2219d94ae1391a79021 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-12Generate one single report for Rally testcasesCédric Ollivier1-9/+17
It eases sharing one single report including all task results. For the time being, rally_jobs only generates neutron.html. Then it only adds one report for rally_full and rally_sanity. We may consider generating only one json file but it asks for a refactoring (result parsing) which can be done in a second change. Change-Id: I8fa75ae80750336950f355c2aedc3dd4dc621cc5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-26Set Gnocchi scenario as optional in rally testsJuha Kosonen1-6/+10
The execution of an optional scenario is skipped if the corresponding openstack service does not exist. Change-Id: I8721f26ebc253ce02138b85d6c88e659c5afae80 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-12-19Add task arguments to rally_jobsJuha Kosonen1-4/+14
Define floating network as a Rally task argument. Enable rally_jobs subtest. Change-Id: I37d7c4718cfb3de3ad1980878e0529d652013ccb Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-11-17Rename Rally blacklist.txt to blacklist.yamlCédric Ollivier1-1/+1
It eases editing it or verifyfing it via yamllint. Change-Id: I380830eff5f404745e284067b5a10f58dc60b80e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-15Do not create files in site-package directoryJuha Kosonen1-5/+22
Use /home/opnfv/functest/data/rally/task directory for storing temporary files when running rally tasks. Also removes unused vm scenario from task service list. Change-Id: Icfd4f99ebe6194360bda8bd88e497e018a9541a0 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-09-23Protect vs former OS env varsCédric Ollivier1-0/+5
rally_jobs is failing vs APEX which still sets OS_TENANT [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/324/console Change-Id: I672bfa93b37b1b773ea7d20fdd91bea0ff14b79f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-21Remove rally plugins and extra when cleaningCédric Ollivier1-2/+11
Change-Id: I15393b870d648432c900d429d17129c630ed4f58 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-18Add support for Rally OpenStack CI test casesJuha Kosonen1-13/+121
Include Neutron rally-jobs. Change-Id: Ic1122962bd7d876d179729640a8a321bc36442d8 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-09-06Add role to users created by rally if requiredCédric Ollivier1-0/+27
It sets [openstack] keystone_default_role if NEW_USER_ROLE differs from member. Change-Id: Ib6be5cf22654e882ea110298cba421c1e87c78fd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-03Refactor RallyBaseJuha Kosonen1-35/+37
This provides a more generic way to integrate test case lists which are not hosted in Functest. Also removes vm scenarios since they have never been a part of actual rally runs. Change-Id: Ib0a020fe72800915bbf2d10ecc690a248d33c246 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-08-28Remove installer type from rally blacklistJuha Kosonen1-5/+2
Enables utilization of blacklist also on non-OPNFV environments since there is no link to installer type. JIRA: FUNCTEST-1008 Change-Id: I3eb4377af153480794c1a71c5d7ef3e78dacacb9 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-08-14Create new project/user for rally testJuha Kosonen1-2/+20
FUNCTEST-1002 Change-Id: Id19b9aa70aeded6d99978084b3de4a63e31a81ad Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-08-10Remove explicit Rally task validationJuha Kosonen1-20/+4
Utilize the output of Rally task execution since it internally validates the task. Use Popen.communicate to get the output from the running Rally task. Change-Id: I9b1299bc26129ff4f89adccec611c78195a3ab02 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-07-30Delete alt images before removing the accountCédric Ollivier1-1/+1
Else it could raise unauthorized exceptions [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/188/console Change-Id: Ia9b857069f775e2c8ecc5e07cf39b3a1fb7e3540 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-27Stop redirecting output to json filesCédric Ollivier1-15/+10
Rally may print additional data to console which results in an invalid json files. The json files are generated via rally instead of dumping stdout. It's mandatory to backport the next bugfix [1] in stable/fraser. [1] https://gerrit.opnfv.org/gerrit/#/c/60265/ Change-Id: Ifbd90e685a7b52c70b3110a46e3c7991eddc05f4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Clean all possible resourcesCédric Ollivier1-1/+2
It checks all openstack resources before cleaning. It allows removing images even if the test fail quickly. Change-Id: I1763b8a70fa7ffeb03c435e8e775c7afd1a7adac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Check the status of inherited stepsCédric Ollivier1-1/+2
Change-Id: If63c228f2844194279b560515f4ab24a4ee88be0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Force result = 0 if exceptionCédric Ollivier1-0/+1
self.result can be positive due to intermediary steps (scenarios). Else it can return false positives [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-virtual-suite-master/113/console Change-Id: Iecadee7f7380fda5273a0668aff1b441647c45aa Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-30Inherit rally from VmReady1Cédric Ollivier1-125/+15
It also fixes clean(). Change-Id: I42d1305d5cdb5a717cfa7fce26798ac7102310f7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>