Add task file and test case description file for TC063_StorageCapacity
[yardstick.git] / docs / userguide / opnfv_yardstick_tc025.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, Huawei Technologies Co.,Ltd and others.
5
6 *************************************
7 Yardstick Test Case Description TC025
8 *************************************
9
10 +-----------------------------------------------------------------------------+
11 |OpenStack Controller Node abnormally shutdown High Availability              |
12 |                                                                             |
13 +--------------+--------------------------------------------------------------+
14 |test case id  | OPNFV_YARDSTICK_TC025_HA: OpenStack Controller Node          |
15 |              | abnormally shutdown                                          |
16 |              |                                                              |
17 +--------------+--------------------------------------------------------------+
18 |test purpose  | This test case will verify the high availability of          |
19 |              | controller node. When one of the controller node abnormally  |
20 |              | shutdown, the service provided by it should be OK.           |
21 |              |                                                              |
22 +--------------+--------------------------------------------------------------+
23 |test method   | This test case shutdowns a specified controller node with    |
24 |              | some fault injection tools, then checks whether all services |
25 |              | provided by the controller node are OK with some monitor     |
26 |              | tools.                                                       |
27 |              |                                                              |
28 +--------------+--------------------------------------------------------------+
29 |attackers     | In this test case, an attacker called "host-shutdown" 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 "host-shutdown" in       |
33 |              | this test case.                                              |
34 |              | 2) host: the name of a controller node being attacked.       |
35 |              |                                                              |
36 |              | e.g.                                                         |
37 |              | -fault_type: "host-shutdown"                                 |
38 |              | -host: node1                                                 |
39 |              |                                                              |
40 +--------------+--------------------------------------------------------------+
41 |monitors      | In this test case, one kind of monitor are needed:           |
42 |              | 1. the "openstack-cmd" monitor constantly request a specific |
43 |              |    Openstack command, which needs two parameters             |
44 |              | 1) monitor_type: which is used for finding the monitor class |
45 |              | and related scritps. It should be always set to              |
46 |              | "openstack-cmd" for this monitor.                            |
47 |              | 2) command_name: which is the command name used for request  |
48 |              |                                                              |
49 |              | There are four instance of the "openstack-cmd" monitor:      |
50 |              | monitor1:                                                    |
51 |              | -monitor_type: "openstack-cmd"                               |
52 |              | -api_name: "nova image-list"                                 |
53 |              | monitor2:                                                    |
54 |              | -monitor_type: "openstack-cmd"                               |
55 |              | -api_name: "neutron router-list"                             |
56 |              | monitor3:                                                    |
57 |              | -monitor_type: "openstack-cmd"                               |
58 |              | -api_name: "heat stack-list"                                 |
59 |              | monitor4:                                                    |
60 |              | -monitor_type: "openstack-cmd"                               |
61 |              | -api_name: "cinder list"                                     |
62 |              |                                                              |
63 +--------------+--------------------------------------------------------------+
64 |metrics       | In this test case, there is one metric:                      |
65 |              | 1)service_outage_time: which indicates the maximum outage    |
66 |              | time (seconds) of the specified Openstack command request.   |
67 |              |                                                              |
68 +--------------+--------------------------------------------------------------+
69 |test tool     | Developed by the project. Please see folder:                 |
70 |              | "yardstick/benchmark/scenarios/availability/ha_tools"        |
71 |              |                                                              |
72 +--------------+--------------------------------------------------------------+
73 |references    | ETSI NFV REL001                                              |
74 |              |                                                              |
75 +--------------+--------------------------------------------------------------+
76 |configuration | This test case needs two configuration files:                |
77 |              | 1) test case file: opnfv_yardstick_tc019.yaml                |
78 |              | -Attackers: see above "attackers" discription                |
79 |              | -waiting_time: which is the time (seconds) from the process  |
80 |              | being killed to stoping monitors the monitors                |
81 |              | -Monitors: see above "monitors" discription                  |
82 |              | -SLA: see above "metrics" discription                        |
83 |              |                                                              |
84 |              | 2)POD file: pod.yaml                                         |
85 |              | The POD configuration should record on pod.yaml first.       |
86 |              | the "host" item in this test case will use the node name in  |
87 |              | the pod.yaml.                                                |
88 |              |                                                              |
89 +--------------+--------------------------------------------------------------+
90 |test sequence | description and expected result                              |
91 |              |                                                              |
92 +--------------+--------------------------------------------------------------+
93 |step 1        | start monitors:                                              |
94 |              | each monitor will run with independently process             |
95 |              |                                                              |
96 |              | Result: The monitor info will be collected.                  |
97 |              |                                                              |
98 +--------------+--------------------------------------------------------------+
99 |step 2        | do attacker: connect the host through SSH, and then execute  |
100 |              | shutdown script on the host                                  |
101 |              |                                                              |
102 |              | Result: The host will be shutdown.                           |
103 |              |                                                              |
104 +--------------+--------------------------------------------------------------+
105 |step 3        | stop monitors after a period of time specified by            |
106 |              | "waiting_time"                                               |
107 |              |                                                              |
108 |              | Result: All monitor result will be aggregated.               |
109 |              |                                                              |
110 +--------------+--------------------------------------------------------------+
111 |step 4        | verify the SLA                                               |
112 |              |                                                              |
113 |              | Result: The test case is passed or not.                      |
114 |              |                                                              |
115 +--------------+--------------------------------------------------------------+
116 |post-action   | It is the action when the test cases exist. It restarts the  |
117 |              | specified controller node if it is not restarted.            |
118 |              |                                                              |
119 +--------------+--------------------------------------------------------------+
120 |test verdict  | Fails only if SLA is not passed, or if there is a test case  |
121 |              | execution problem.                                           |
122 |              |                                                              |
123 +--------------+--------------------------------------------------------------+