blob: bf44f13ac0b7c2c327a4c84de60faf2768b11d42 [file] [log] [blame]
David Kranz6308ec22012-02-22 09:36:48 -05001Quanta Research Cambridge OpenStack Stress Test System
2======================================================
3
4Nova is a distributed, asynchronous system that is prone to race condition
5bugs. These bugs will not be easily found during
David Kranzd10601c2012-03-15 15:58:28 -04006functional testing but will be encountered by users in large deployments in a
David Kranz6308ec22012-02-22 09:36:48 -05007way that is hard to debug. The stress test tries to cause these bugs to happen
8in a more controlled environment.
9
David Kranzd10601c2012-03-15 15:58:28 -040010The basic idea of the test is that there are a number of actions, roughly
David Kranz6308ec22012-02-22 09:36:48 -050011corresponding to the Compute API, that are fired pseudo-randomly at a nova
12cluster as fast as possible. These actions consist of what to do, how to
13verify success, and a state filter to make sure that the operation makes sense.
14For example, if the action is to reboot a server and none are active, nothing
15should be done. A test case is a set of actions to be performed and the
David Kranzd10601c2012-03-15 15:58:28 -040016probability that each action should be selected. There are also parameters
David Kranz6308ec22012-02-22 09:36:48 -050017controlling rate of fire and stuff like that.
18
19This test framework is designed to stress test a Nova cluster. Hence,
20you must have a working Nova cluster.
21
22Environment
23------------
24This particular framework assumes your working Nova cluster understands Nova
25API 2.0. The stress tests can read the logs from the cluster. To enable this
David Kranz30fe84a2012-03-20 16:25:47 -040026you have to provide the hostname to call 'nova-manage' and
27the private key and user name for ssh to the cluster in the
David Kranz6308ec22012-02-22 09:36:48 -050028[stress] section of tempest.conf. You also need to provide the
29value 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 Kranz30fe84a2012-03-20 16:25:47 -040034 controller=<hostname for calling nova-manage>
David Kranz6308ec22012-02-22 09:36:48 -050035
36The stress test needs the top-level tempest directory to be on PYTHONPATH
37if you are not using nosetests to run.
38
David Kranzd10601c2012-03-15 15:58:28 -040039For real stress, you need to remove "ratelimit" from the pipeline in
David Kranz6308ec22012-02-22 09:36:48 -050040api-paste.ini.
41
42
43Running the sample test
44-----------------------
45
46To test your installation, do the following (from the tempest directory):
47
48 PYTHONPATH=. python stress/tests/user_script_sample.py
49
50This sample test tries to create a few VMs and kill a few VMs.
51
52
53Additional Tools
54----------------
55
56Sometimes the tests don't finish, or there are failures. In these
57cases, you may want to clean out the nova cluster. We have provided
58some scripts to do this in the ``tools`` subdirectory. To use these
59tools, you will need to install python-novaclient.
60You can then use the following script to destroy any keypairs,
61floating ips, and servers::
62
63stress/tools/nova_destroy_all.py