cleanup: rm node_ID from yardstick prepare_env file
[yardstick.git] / docs / testing / user / userguide / opnfv_yardstick_tc056.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 TC056
9 *************************************
10
11 +-----------------------------------------------------------------------------+
12 |OpenStack Controller Messaging Queue Service High Availability               |
13 +==============+==============================================================+
14 |test case id  | OPNFV_YARDSTICK_TC056:OpenStack Controller Messaging Queue   |
15 |              | Service High Availability                                    |
16 +--------------+--------------------------------------------------------------+
17 |test purpose  | This test case will verify the high availability of the      |
18 |              | messaging queue service(RabbitMQ) that supports OpenStack on |
19 |              | controller node. When messaging queue service(which is       |
20 |              | active) of a specified controller node is killed, the test   |
21 |              | case will check whether messaging queue services(which are   |
22 |              | standby) on other controller nodes will be switched active,  |
23 |              | and whether the cluster manager on attacked the controller   |
24 |              | node will restart the stopped messaging queue.               |
25 +--------------+--------------------------------------------------------------+
26 |test method   | This test case kills the processes of messaging queue        |
27 |              | service on a selected controller node, then checks whether   |
28 |              | the request of the related Openstack command is OK and the   |
29 |              | killed processes are recovered.                              |
30 +--------------+--------------------------------------------------------------+
31 |attackers     | In this test case, an attacker called "kill-process" is      |
32 |              | needed. This attacker includes three parameters:             |
33 |              | 1) fault_type: which is used for finding the attacker's      |
34 |              | scripts. It should be always set to "kill-process" in this   |
35 |              | test case.                                                   |
36 |              | 2) process_name: which is the process name of the specified  |
37 |              | OpenStack service. If there are multiple processes use the   |
38 |              | same name on the host, all of them are killed by this        |
39 |              | attacker.                                                    |
40 |              | In this case, this parameter should always set to "rabbitmq".|
41 |              | 3) host: which is the name of a control node being attacked. |
42 |              |                                                              |
43 |              | e.g.                                                         |
44 |              | -fault_type: "kill-process"                                  |
45 |              | -process_name: "rabbitmq-server"                             |
46 |              | -host: node1                                                 |
47 |              |                                                              |
48 +--------------+--------------------------------------------------------------+
49 |monitors      | In this test case, two kinds of monitor are needed:          |
50 |              | 1. the "openstack-cmd" monitor constantly request a specific |
51 |              | Openstack command, which needs two parameters:               |
52 |              | 1) monitor_type: which is used for finding the monitor class |
53 |              | and related scritps. It should be always set to              |
54 |              | "openstack-cmd" for this monitor.                            |
55 |              | 2) command_name: which is the command name used for request. |
56 |              |                                                              |
57 |              | 2. the "process" monitor check whether a process is running  |
58 |              | on a specific node, which needs three parameters:            |
59 |              | 1) monitor_type: which used for finding the monitor class    |
60 |              | and related scripts. It should be always set to "process"    |
61 |              | for this monitor.                                            |
62 |              | 2) process_name: which is the process name for monitor       |
63 |              | 3) host: which is the name of the node runing the process    |
64 |              | In this case, the command_name of monitor1 should be         |
65 |              | services that will use the messaging queue(current nova,     |
66 |              | neutron, cinder ,heat and ceilometer are using RabbitMQ)     |
67 |              | , and the process-name of monitor2 should be "rabbitmq",     |
68 |              | for example:                                                 |
69 |              |                                                              |
70 |              | e.g.                                                         |
71 |              | monitor1-1:                                                  |
72 |              | -monitor_type: "openstack-cmd"                               |
73 |              | -command_name: "openstack image list"                        |
74 |              | monitor1-2:                                                  |
75 |              | -monitor_type: "openstack-cmd"                               |
76 |              | -command_name: "openstack network list"                      |
77 |              | monitor1-3:                                                  |
78 |              | -monitor_type: "openstack-cmd"                               |
79 |              | -command_name: "openstack volume list"                       |
80 |              | monitor2:                                                    |
81 |              | -monitor_type: "process"                                     |
82 |              | -process_name: "rabbitmq"                                    |
83 |              | -host: node1                                                 |
84 |              |                                                              |
85 +--------------+--------------------------------------------------------------+
86 |metrics       | In this test case, there are two metrics:                    |
87 |              | 1)service_outage_time: which indicates the maximum outage    |
88 |              | time (seconds) of the specified Openstack command request.   |
89 |              | 2)process_recover_time: which indicates the maximum time     |
90 |              | (seconds) from the process being killed to recovered         |
91 |              |                                                              |
92 +--------------+--------------------------------------------------------------+
93 |test tool     | Developed by the project. Please see folder:                 |
94 |              | "yardstick/benchmark/scenarios/availability/ha_tools"        |
95 |              |                                                              |
96 +--------------+--------------------------------------------------------------+
97 |references    | ETSI NFV REL001                                              |
98 |              |                                                              |
99 +--------------+--------------------------------------------------------------+
100 |configuration | This test case needs two configuration files:                |
101 |              | 1) test case file:opnfv_yardstick_tc056.yaml                 |
102 |              | -Attackers: see above "attackers" description                |
103 |              | -waiting_time: which is the time (seconds) from the process  |
104 |              | being killed to stoping monitors the monitors                |
105 |              | -Monitors: see above "monitors" description                  |
106 |              | -SLA: see above "metrics" description                        |
107 |              |                                                              |
108 |              | 2)POD file: pod.yaml                                         |
109 |              | The POD configuration should record on pod.yaml first.       |
110 |              | the "host" item in this test case will use the node name in  |
111 |              | the pod.yaml.                                                |
112 |              |                                                              |
113 +--------------+--------------------------------------------------------------+
114 |test sequence | description and expected result                              |
115 |              |                                                              |
116 +--------------+--------------------------------------------------------------+
117 |step 1        | start monitors:                                              |
118 |              | each monitor will run with independently process             |
119 |              |                                                              |
120 |              | Result: The monitor info will be collected.                  |
121 |              |                                                              |
122 +--------------+--------------------------------------------------------------+
123 |step 2        | do attacker: connect the host through SSH, and then execute  |
124 |              | the kill process script with param value specified by        |
125 |              | "process_name"                                               |
126 |              |                                                              |
127 |              | Result: Process will be killed.                              |
128 |              |                                                              |
129 +--------------+--------------------------------------------------------------+
130 |step 3        | stop monitors after a period of time specified by            |
131 |              | "waiting_time"                                               |
132 |              |                                                              |
133 |              | Result: The monitor info will be aggregated.                 |
134 |              |                                                              |
135 +--------------+--------------------------------------------------------------+
136 |step 4        | verify the SLA                                               |
137 |              |                                                              |
138 |              | Result: The test case is passed or not.                      |
139 |              |                                                              |
140 +--------------+--------------------------------------------------------------+
141 |post-action   | It is the action when the test cases exist. It will check    |
142 |              | the status of the specified process on the host, and restart |
143 |              | the process if it is not running for next test cases.        |
144 |              |                                                              |
145 +--------------+--------------------------------------------------------------+
146 |test verdict  | Fails only if SLA is not passed, or if there is a test case  |
147 |              | execution problem.                                           |
148 |              |                                                              |
149 +--------------+--------------------------------------------------------------+