fix bug of tc075 \t format error in yaml
[yardstick.git] / docs / userguide / opnfv_yardstick_tc051.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, Yin Kanglin and others.
5 .. 14_ykl@tongji.edu.cn
6
7 *************************************
8 Yardstick Test Case Description TC051
9 *************************************
10
11 +-----------------------------------------------------------------------------+
12 |OpenStack Controller Node CPU Overload High Availability                     |
13 |                                                                             |
14 +--------------+--------------------------------------------------------------+
15 |test case id  | OPNFV_YARDSTICK_TC051: OpenStack Controller Node CPU         |
16 |              | Overload High Availability                                   |
17 +--------------+--------------------------------------------------------------+
18 |test purpose  | This test case will verify the high availability of control  |
19 |              | node. When the CPU usage of a specified controller node is   |
20 |              | stressed to 100%, which breaks down the Openstack services   |
21 |              | on this node. These Openstack service should able to be      |
22 |              | accessed by other controller nodes, and the services on      |
23 |              | failed controller node should be isolated.                   |
24 +--------------+--------------------------------------------------------------+
25 |test method   | This test case stresses the CPU uasge of a specified control |
26 |              | node to 100%, then checks whether all services provided by   |
27 |              | the environment are OK with some monitor tools.              |
28 +--------------+--------------------------------------------------------------+
29 |attackers     | In this test case, an attacker called "stress-cpu" is        |
30 |              | needed. This attacker includes two parameters:               |
31 |              | 1) fault_type: which is used for finding the attacker's      |
32 |              | scripts. It should be always set to "stress-cpu" in          |
33 |              | this test case.                                              |
34 |              | 2) host: which is the name of a control node being attacked. |
35 |              | e.g.                                                         |
36 |              | -fault_type: "stress-cpu"                                    |
37 |              | -host: node1                                                 |
38 +--------------+--------------------------------------------------------------+
39 |monitors      | In this test case, the monitor named "openstack-cmd" is      |
40 |              | needed. The monitor needs needs two parameters:              |
41 |              | 1) monitor_type: which is used for finding the monitor class |
42 |              | and related scritps. It should be always set to              |
43 |              | "openstack-cmd" for this monitor.                            |
44 |              | 2) command_name: which is the command name used for request  |
45 |              |                                                              |
46 |              | There are four instance of the "openstack-cmd" monitor:      |
47 |              | monitor1:                                                    |
48 |              | -monitor_type: "openstack-cmd"                               |
49 |              | -command_name: "nova image-list"                             |
50 |              | monitor2:                                                    |
51 |              | -monitor_type: "openstack-cmd"                               |
52 |              | -command_name: "neutron router-list"                         |
53 |              | monitor3:                                                    |
54 |              | -monitor_type: "openstack-cmd"                               |
55 |              | -command_name: "heat stack-list"                             |
56 |              | monitor4:                                                    |
57 |              | -monitor_type: "openstack-cmd"                               |
58 |              | -command_name: "cinder list"                                 |
59 +--------------+--------------------------------------------------------------+
60 |metrics       | In this test case, there is one metric:                      |
61 |              | 1)service_outage_time: which indicates the maximum outage    |
62 |              | time (seconds) of the specified Openstack command request.   |
63 +--------------+--------------------------------------------------------------+
64 |test tool     | Developed by the project. Please see folder:                 |
65 |              | "yardstick/benchmark/scenarios/availability/ha_tools"        |
66 |              |                                                              |
67 +--------------+--------------------------------------------------------------+
68 |references    | ETSI NFV REL001                                              |
69 |              |                                                              |
70 +--------------+--------------------------------------------------------------+
71 |configuration | This test case needs two configuration files:                |
72 |              | 1) test case file: opnfv_yardstick_tc051.yaml                |
73 |              | -Attackers: see above "attackers" discription                |
74 |              | -waiting_time: which is the time (seconds) from the process  |
75 |              | being killed to stoping monitors the monitors                |
76 |              | -Monitors: see above "monitors" discription                  |
77 |              | -SLA: see above "metrics" discription                        |
78 |              |                                                              |
79 |              | 2)POD file: pod.yaml                                         |
80 |              | The POD configuration should record on pod.yaml first.       |
81 |              | the "host" item in this test case will use the node name in  |
82 |              | the pod.yaml.                                                |
83 |              |                                                              |
84 +--------------+--------------------------------------------------------------+
85 |test sequence | description and expected result                              |
86 |              |                                                              |
87 +--------------+--------------------------------------------------------------+
88 |step 1        | start monitors:                                              |
89 |              | each monitor will run with independently process             |
90 |              |                                                              |
91 |              | Result: The monitor info will be collected.                  |
92 |              |                                                              |
93 +--------------+--------------------------------------------------------------+
94 |step 2        | do attacker: connect the host through SSH, and then execute  |
95 |              | the stress cpu script on the host.                           |
96 |              |                                                              |
97 |              | Result: The CPU usage of the host will be stressed to 100%.  |
98 |              |                                                              |
99 +--------------+--------------------------------------------------------------+
100 |step 3        | stop monitors after a period of time specified by            |
101 |              | "waiting_time"                                               |
102 |              |                                                              |
103 |              | Result: The monitor info will be aggregated.                 |
104 |              |                                                              |
105 +--------------+--------------------------------------------------------------+
106 |step 4        | verify the SLA                                               |
107 |              |                                                              |
108 |              | Result: The test case is passed or not.                      |
109 |              |                                                              |
110 +--------------+--------------------------------------------------------------+
111 |post-action   | It is the action when the test cases exist. It kills the     |
112 |              | process that stresses the CPU usage.                         |
113 +--------------+--------------------------------------------------------------+
114 |test verdict  | Fails only if SLA is not passed, or if there is a test case  |
115 |              | execution problem.                                           |
116 |              |                                                              |
117 +--------------+--------------------------------------------------------------+