tempest/tempest/stress
Sirushti Murugesan 12dc9735a5 py3: Miscellaneous fixes
* Use base64 from oslo_serialization
* Use six.BytesIO instead of StringIO
* Use sys.maxsize instead of sys.maxint
* Use sorted with a key argument to sort by
* Use range instead of moves.xrange or xrange
* Use floor division instead of float division
* Use 'r+' to open a file than 'rw'
* Use six.int2byte instead of chr
* Stop using conn.strict in response_class()
* Tests: Only compare length for bytes, not assertRegex

These changes are tested here: I3a1dfde76009cbac1d419e0ff3f1d20c4a2e99c3

Change-Id: Iab9c23e497956e45c5d04a3d6513acf1b026aafb
2016-09-09 16:54:11 +02:00
..
actions Use testcase name as prefix of resource name 2016-09-06 17:25:33 +08:00
etc Fix stress tests job to use dynamic cred 2016-01-28 15:29:10 +09:00
tools Change logging in stress test 2013-08-08 15:10:29 +02:00
README.rst Add run_stress to cliff-based cli framework 2015-12-07 11:47:46 +09:00
__init__.py Removed deprecation warning from 'tempest --help' 2016-03-23 22:19:40 -05:00
cleanup.py Use common "waiters.wait_for_snapshot_status" function everywhere 2016-03-25 16:39:35 +00:00
driver.py py3: Miscellaneous fixes 2016-09-09 16:54:11 +02:00
stressaction.py Python 3 deprecated the logger.warn method in favor of warning 2016-02-18 06:56:59 +00: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.

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

The stress test framework can automatically discover test inside the tempest test suite. All test flag with the @stresstest decorator will be executed. In order to use this discovery you have to install tempest CLI, be in the tempest root directory and execute the following:

tempest run-stress -a -d 30

Running the sample test

To test installation, do the following:

tempest run-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.

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