Adding scale up feature to prox MPLS Tagging OvS-DPDK & SRIOV
[yardstick.git] / docs / testing / user / userguide / opnfv_yardstick_tc053.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 TC053
9 *************************************
10
11 +-----------------------------------------------------------------------------+
12 |OpenStack Controller Load Balance Service High Availability                  |
13 |                                                                             |
14 +--------------+--------------------------------------------------------------+
15 |test case id  | OPNFV_YARDSTICK_TC053: OpenStack Controller Load Balance     |
16 |              | Service High Availability                                    |
17 +--------------+--------------------------------------------------------------+
18 |test purpose  | This test case will verify the high availability of the      |
19 |              | load balance service(current is HAProxy) that supports       |
20 |              | OpenStack on controller node. When the load balance service  |
21 |              | of a specified controller node is killed, whether other load |
22 |              | balancers on other controller nodes will work, and whether   |
23 |              | the controller node will restart the load balancer are       |
24 |              | checked.                                                     |
25 +--------------+--------------------------------------------------------------+
26 |test method   | This test case kills the processes of load balance service   |
27 |              | on a selected control node, then checks whether the request  |
28 |              | of the related Openstack command is OK and the killed        |
29 |              | 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 "swift-    |
41 |              | proxy".                                                      |
42 |              | 3) host: which is the name of a control node being attacked. |
43 |              |                                                              |
44 |              | e.g.                                                         |
45 |              | -fault_type: "kill-process"                                  |
46 |              | -process_name: "haproxy"                                     |
47 |              | -host: node1                                                 |
48 |              |                                                              |
49 +--------------+--------------------------------------------------------------+
50 |monitors      | In this test case, two kinds of monitor are needed:          |
51 |              | 1. the "openstack-cmd" monitor constantly request a specific |
52 |              | Openstack command, which needs two parameters:               |
53 |              | 1) monitor_type: which is used for finding the monitor class |
54 |              | and related scritps. It should be always set to              |
55 |              | "openstack-cmd" for this monitor.                            |
56 |              | 2) command_name: which is the command name used for request. |
57 |              |                                                              |
58 |              | 2. the "process" monitor check whether a process is running  |
59 |              | on a specific node, which needs three parameters:            |
60 |              | 1) monitor_type: which used for finding the monitor class    |
61 |              | and related scripts. It should be always set to "process"    |
62 |              | for this monitor.                                            |
63 |              | 2) process_name: which is the process name for monitor       |
64 |              | 3) host: which is the name of the node runing the process    |
65 |              | In this case, the command_name of monitor1 should be         |
66 |              | services that is supported by load balancer and the process- |
67 |              | name of monitor2 should be "haproxy", for example:           |
68 |              |                                                              |
69 |              | e.g.                                                         |
70 |              | monitor1:                                                    |
71 |              | -monitor_type: "openstack-cmd"                               |
72 |              | -command_name: "nova image-list"                             |
73 |              | monitor2:                                                    |
74 |              | -monitor_type: "process"                                     |
75 |              | -process_name: "haproxy"                                     |
76 |              | -host: node1                                                 |
77 |              |                                                              |
78 +--------------+--------------------------------------------------------------+
79 |metrics       | In this test case, there are two metrics:                    |
80 |              | 1)service_outage_time: which indicates the maximum outage    |
81 |              | time (seconds) of the specified Openstack command request.   |
82 |              | 2)process_recover_time: which indicates the maximun time     |
83 |              | (seconds) from the process being killed to recovered         |
84 |              |                                                              |
85 +--------------+--------------------------------------------------------------+
86 |test tool     | Developed by the project. Please see folder:                 |
87 |              | "yardstick/benchmark/scenarios/availability/ha_tools"        |
88 |              |                                                              |
89 +--------------+--------------------------------------------------------------+
90 |references    | ETSI NFV REL001                                              |
91 |              |                                                              |
92 +--------------+--------------------------------------------------------------+
93 |configuration | This test case needs two configuration files:                |
94 |              | 1) test case file: opnfv_yardstick_tc053.yaml                |
95 |              | -Attackers: see above "attackers" discription                |
96 |              | -waiting_time: which is the time (seconds) from the process  |
97 |              | being killed to stoping monitors the monitors                |
98 |              | -Monitors: see above "monitors" discription                  |
99 |              | -SLA: see above "metrics" discription                        |
100 |              |                                                              |
101 |              | 2)POD file: pod.yaml                                         |
102 |              | The POD configuration should record on pod.yaml first.       |
103 |              | the "host" item in this test case will use the node name in  |
104 |              | the pod.yaml.                                                |
105 |              |                                                              |
106 +--------------+--------------------------------------------------------------+
107 |test sequence | description and expected result                              |
108 |              |                                                              |
109 +--------------+--------------------------------------------------------------+
110 |step 1        | start monitors:                                              |
111 |              | each monitor will run with independently process             |
112 |              |                                                              |
113 |              | Result: The monitor info will be collected.                  |
114 |              |                                                              |
115 +--------------+--------------------------------------------------------------+
116 |step 2        | do attacker: connect the host through SSH, and then execute  |
117 |              | the kill process script with param value specified by        |
118 |              | "process_name"                                               |
119 |              |                                                              |
120 |              | Result: Process will be killed.                              |
121 |              |                                                              |
122 +--------------+--------------------------------------------------------------+
123 |step 3        | stop monitors after a period of time specified by            |
124 |              | "waiting_time"                                               |
125 |              |                                                              |
126 |              | Result: The monitor info will be aggregated.                 |
127 |              |                                                              |
128 +--------------+--------------------------------------------------------------+
129 |step 4        | verify the SLA                                               |
130 |              |                                                              |
131 |              | Result: The test case is passed or not.                      |
132 |              |                                                              |
133 +--------------+--------------------------------------------------------------+
134 |post-action   | It is the action when the test cases exist. It will check    |
135 |              | the status of the specified process on the host, and restart |
136 |              | the process if it is not running for next test cases.        |
137 |              |                                                              |
138 |              | Notice: This post-action uses 'lsb_release' command to check |
139 |              | the host linux distribution and determine the OpenStack      |
140 |              | service name to restart the process. Lack of 'lsb_release'   |
141 |              | on the host may cause failure to restart the process.        |
142 |              |                                                              |
143 +--------------+--------------------------------------------------------------+
144 |test verdict  | Fails only if SLA is not passed, or if there is a test case  |
145 |              | execution problem.                                           |
146 |              |                                                              |
147 +--------------+--------------------------------------------------------------+