David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 1 | Quanta Research Cambridge OpenStack Stress Test System
|
| 2 | ======================================================
|
| 3 |
|
| 4 | Nova is a distributed, asynchronous system that is prone to race condition
|
| 5 | bugs. These bugs will not be easily found during
|
David Kranz | d10601c | 2012-03-15 15:58:28 -0400 | [diff] [blame] | 6 | functional testing but will be encountered by users in large deployments in a
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 7 | way that is hard to debug. The stress test tries to cause these bugs to happen
|
| 8 | in a more controlled environment.
|
| 9 |
|
David Kranz | d10601c | 2012-03-15 15:58:28 -0400 | [diff] [blame] | 10 | The basic idea of the test is that there are a number of actions, roughly
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 11 | corresponding to the Compute API, that are fired pseudo-randomly at a nova
|
| 12 | cluster as fast as possible. These actions consist of what to do, how to
|
| 13 | verify success, and a state filter to make sure that the operation makes sense.
|
| 14 | For example, if the action is to reboot a server and none are active, nothing
|
| 15 | should be done. A test case is a set of actions to be performed and the
|
David Kranz | d10601c | 2012-03-15 15:58:28 -0400 | [diff] [blame] | 16 | probability that each action should be selected. There are also parameters
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 17 | controlling rate of fire and stuff like that.
|
| 18 |
|
| 19 | This test framework is designed to stress test a Nova cluster. Hence,
|
David Kranz | 73cb6a7 | 2012-04-26 15:19:50 -0400 | [diff] [blame] | 20 | you must have a working Nova cluster with rate limiting turned off.
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 21 |
|
| 22 | Environment
|
| 23 | ------------
|
| 24 | This particular framework assumes your working Nova cluster understands Nova
|
| 25 | API 2.0. The stress tests can read the logs from the cluster. To enable this
|
David Kranz | 30fe84a | 2012-03-20 16:25:47 -0400 | [diff] [blame] | 26 | you have to provide the hostname to call 'nova-manage' and
|
| 27 | the private key and user name for ssh to the cluster in the
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 28 | [stress] section of tempest.conf. You also need to provide the
|
| 29 | value of --logdir in nova.conf:
|
| 30 |
|
| 31 | host_private_key_path=<path to private ssh key>
|
| 32 | host_admin_user=<name of user for ssh command>
|
| 33 | nova_logdir=<value of --logdir in nova.conf>
|
David Kranz | 30fe84a | 2012-03-20 16:25:47 -0400 | [diff] [blame] | 34 | controller=<hostname for calling nova-manage>
|
David Kranz | 180fed1 | 2012-03-27 14:31:29 -0400 | [diff] [blame] | 35 | max_instances=<limit on instances that will be created>
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 36 |
|
David Kranz | 73cb6a7 | 2012-04-26 15:19:50 -0400 | [diff] [blame] | 37 | Also, make sure to set
|
| 38 |
|
| 39 | log_level=CRITICAL
|
| 40 |
|
| 41 | so that the API client does not log failed calls which are expected while
|
| 42 | running stress tests.
|
| 43 |
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 44 | The stress test needs the top-level tempest directory to be on PYTHONPATH
|
| 45 | if you are not using nosetests to run.
|
| 46 |
|
David Kranz | 6308ec2 | 2012-02-22 09:36:48 -0500 | [diff] [blame] | 47 |
|
| 48 | Running the sample test
|
| 49 | -----------------------
|
| 50 |
|
| 51 | To test your installation, do the following (from the tempest directory):
|
| 52 |
|
| 53 | PYTHONPATH=. python stress/tests/user_script_sample.py
|
| 54 |
|
| 55 | This sample test tries to create a few VMs and kill a few VMs.
|
| 56 |
|
| 57 |
|
| 58 | Additional Tools
|
| 59 | ----------------
|
| 60 |
|
| 61 | Sometimes the tests don't finish, or there are failures. In these
|
| 62 | cases, you may want to clean out the nova cluster. We have provided
|
| 63 | some scripts to do this in the ``tools`` subdirectory. To use these
|
| 64 | tools, you will need to install python-novaclient.
|
| 65 | You can then use the following script to destroy any keypairs,
|
| 66 | floating ips, and servers::
|
| 67 |
|
| 68 | stress/tools/nova_destroy_all.py
|