blob: 20e58d4bb936ad2da5d46b60cdd00c7667f39795 [file] [log] [blame]
Sean Dague7679b482013-05-24 08:49:44 -04001Tempest Field Guide to Stress Tests
Attila Fazekas23fdf1d2013-06-09 16:35:23 +02002===================================
David Kranzb9d97502013-05-01 15:55:04 -04003
4Nova is a distributed, asynchronous system that is prone to race condition
5bugs. These bugs will not be easily found during
6functional testing but will be encountered by users in large deployments in a
7way that is hard to debug. The stress test tries to cause these bugs to happen
8in a more controlled environment.
9
10
11Environment
Attila Fazekas23fdf1d2013-06-09 16:35:23 +020012-----------
Sean Dague7679b482013-05-24 08:49:44 -040013This particular framework assumes your working Nova cluster understands Nova
David Kranzb9d97502013-05-01 15:55:04 -040014API 2.0. The stress tests can read the logs from the cluster. To enable this
15you have to provide the hostname to call 'nova-manage' and
16the private key and user name for ssh to the cluster in the
17[stress] section of tempest.conf. You also need to provide the
18location of the log files:
19
20 target_logfiles = "regexp to all log files to be checked for errors"
21 target_private_key_path = "private ssh key for controller and log file nodes"
22 target_ssh_user = "username for controller and log file nodes"
23 target_controller = "hostname or ip of controller node (for nova-manage)
24 log_check_interval = "time between checking logs for errors (default 60s)"
25
Marc Kodererb714de52013-08-08 09:21:46 +020026To activate logging on your console please make sure that you activate `use_stderr`
27in tempest.conf or use the default `logging.conf.sample` file.
David Kranzb9d97502013-05-01 15:55:04 -040028
Marc Koderer31fe4832013-11-06 17:02:03 +010029Running default stress test set
30-------------------------------
31
32The stress test framework can automatically discover test inside the tempest
33test suite. All test flag with the `@stresstest` decorator will be executed.
34In order to use this discovery you have to be in the tempest root directory
35and execute the following:
36
37 tempest/stress/run_stress.py -a -d 30
38
David Kranzb9d97502013-05-01 15:55:04 -040039Running the sample test
40-----------------------
41
42To test installation, do the following (from the tempest/stress directory):
43
DennyZhangd7a51b42013-09-23 12:10:12 -050044 ./run_stress.py -t etc/server-create-destroy-test.json -d 30
David Kranzb9d97502013-05-01 15:55:04 -040045
46This sample test tries to create a few VMs and kill a few VMs.
47
48
49Additional Tools
50----------------
51
52Sometimes the tests don't finish, or there are failures. In these
53cases, you may want to clean out the nova cluster. We have provided
54some scripts to do this in the ``tools`` subdirectory.
55You can use the following script to destroy any keypairs,
56floating ips, and servers:
57
58tempest/stress/tools/cleanup.py