tempest/stress
David Kranz 779c7f8008 Add resources for floating_ip, keypair, volume. Add floating_ip test.
Provide mechanism to pre-allocate vms, floating_ips, keypairs and volumes.
Abstract time-related functions to PendingAction and move server-specific
  stuff to PendingServerAction subclass.
Rename State to ClusterState.
Add test that associates/disassociates floating_ips and servers.

Change-Id: I1651c38cc75d755bde370fb6a49ff4231e96255e
2012-05-11 11:31:41 -04:00
..
tests Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
tools Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
utils Convert to UNIX line endings 2012-04-03 13:50:27 -04:00
__init__.py Convert to UNIX line endings 2012-04-03 13:50:27 -04:00
basher.py Convert to UNIX line endings 2012-04-03 13:50:27 -04:00
config.py Convert to UNIX line endings 2012-04-03 13:50:27 -04:00
driver.py Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
pending_action.py Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
README.rst Remind user about log_level. 2012-04-26 15:38:30 -04:00
state.py Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
test_case.py Convert to UNIX line endings 2012-04-03 13:50:27 -04:00
test_floating_ips.py Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
test_server_actions.py Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00
test_servers.py Add resources for floating_ip, keypair, volume. Add floating_ip test. 2012-05-11 11:31:41 -04:00

Quanta Research Cambridge OpenStack Stress Test System

Nova 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.

The basic idea of the test is that there are a number of actions, roughly corresponding to the Compute API, that are fired pseudo-randomly at a nova cluster as fast as possible. These actions consist of what to do, how to verify success, and a state filter to make sure that the operation makes sense. For example, if the action is to reboot a server and none are active, nothing should be done. A test case is a set of actions to be performed and the probability that each action should be selected. There are also parameters controlling rate of fire and stuff like that.

This test framework is designed to stress test a Nova cluster. Hence, you must have a working Nova cluster with rate limiting turned off.

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 value of --logdir in nova.conf:

host_private_key_path=<path to private ssh key> host_admin_user=<name of user for ssh command> nova_logdir=<value of --logdir in nova.conf> controller=<hostname for calling nova-manage> max_instances=<limit on instances that will be created>

Also, make sure to set

log_level=CRITICAL

so that the API client does not log failed calls which are expected while running stress tests.

The stress test needs the top-level tempest directory to be on PYTHONPATH if you are not using nosetests to run.

Running the sample test

To test your installation, do the following (from the tempest directory):

PYTHONPATH=. python stress/tests/user_script_sample.py

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. To use these tools, you will need to install python-novaclient. You can then use the following script to destroy any keypairs, floating ips, and servers:

stress/tools/nova_destroy_all.py