Stress Testing of existing cloud using Tempest
Go to file
Ghanshyam Mann 0d1b2d9f2a Switch to use stable data_utils
Tempest provides stable library interfaces under tempest.lib.
This patch switches to use it for data_utils.

Tempest will remove the deprecated version of data_utils
in https://review.opendev.org/c/openstack/tempest/+/499869

Change-Id: I82621da3b9fe33063827f4f662b8fe9b07d6acee
2020-12-29 15:19:12 -06:00
doc/source Create tox environment to build pdf documentation 2020-09-24 10:32:38 +02:00
releasenotes/notes [ussuri][goal] Drop python 2.7 support and testing 2020-02-03 13:31:18 -06:00
tempest_stress Switch to use stable data_utils 2020-12-29 15:19:12 -06:00
.gitignore Adding swap files in .gitignore 2019-08-23 17:01:14 +05:30
.gitreview OpenDev Migration Patch 2019-04-19 19:29:42 +00:00
.stestr.conf Switch tox env to stestr & add .gitreview file 2018-08-31 12:39:55 +00:00
.zuul.yaml Move testing to Wallaby testing runtime 2020-09-17 10:23:01 +05:30
AUTHORS add config files path options 2016-10-17 17:27:09 +09:00
CONTRIBUTING.rst [ussuri][goal] Update contributor documentation 2020-04-22 14:08:48 +00:00
ChangeLog add config files path options 2016-10-17 17:27:09 +09:00
HACKING.rst Use updated hacking url link 2018-10-17 02:33:47 +00:00
LICENSE Initial commit for stress framework from tempest 2016-10-07 17:28:43 +09:00
MANIFEST.in Initial commit for stress framework from tempest 2016-10-07 17:28:43 +09:00
README.rst Cleanup py27 support 2020-04-13 11:10:14 +02:00
babel.cfg Initial commit for stress framework from tempest 2016-10-07 17:28:43 +09:00
requirements.txt Multiple fix: now running 2016-10-21 10:25:31 +09:00
setup.cfg Switch testing to Victoria testing runtime 2020-05-05 13:37:20 +05:30
setup.py Cleanup py27 support 2020-04-13 11:10:14 +02:00
test-requirements.txt Switch to newer openstackdocstheme version 2020-06-02 14:23:40 +02:00
tox.ini Create tox environment to build pdf documentation 2020-09-24 10:32:38 +02:00

README.rst

Tempest Field Guide to Stress Tests

OpenStack is a distributed, asynchronous system that is prone to race condition bugs. These bugs will not be easily found during functional testing but will be encountered by users in large deployments in a way that is hard to debug. The stress test tries to cause these bugs to happen in a more controlled environment.

Stress tests are designed to stress an OpenStack environment by running a high workload against it and seeing what breaks. The stress test framework runs several test jobs in parallel and can run any existing test in Tempest as a stress job.

Environment

This particular framework assumes your working Nova cluster understands Nova API 2.0. The stress tests can read the logs from the cluster. To enable this you have to provide the hostname to call 'nova-manage' and the private key and user name for ssh to the cluster in the [stress] section of tempest.conf. You also need to provide the location of the log files:

  • target_logfiles = "regexp to all log files to be checked for errors"
  • target_private_key_path = "private ssh key for controller and log file nodes"
  • target_ssh_user = "username for controller and log file nodes"
  • target_controller = "hostname or ip of controller node (for nova-manage)
  • log_check_interval = "time between checking logs for errors (default 60s)"

To activate logging on your console please make sure that you activate use_stderr in tempest.conf or use the default logging.conf.sample file.

Running default stress test set

Installation

  1. You first need to clone this repo.:

    $ git clone https://github.com/openstack/tempest-stress
    $ cd  tempest_stress
  2. Install:

    $ python setup.py install
  3. Install Tempest

Configuration

To Run stress tests, two configuration files are needed:

  1. tempest.conf - As per Tempest configuration guidelines here: configuration
  2. stress_tests.conf - same location as tempest.conf

later one is being used to define all config options specific to stress tests.

Run

Run all tests:

$ run-tempest-stress -a -d 30

Run specific test:

$ run-tempest-stress -t ./tempest_stress/etc/server-create-destroy-test.json -d 30

This sample test tries to create a few VMs and kill a few VMs.

For more information please refer run-tempest-stress CLI help:

$ run-tempest-stress -h

Additional Tools

Sometimes the tests don't finish, or there are failures. In these cases, you may want to clean out the nova cluster. We have provided some scripts to do this in the tools subdirectory. You can use the following script to destroy any keypairs, floating ips, and servers:

tempest_stress/tools/cleanup.py