add yardstick iruya 9.0.0 release notes
[yardstick.git] / docs / testing / user / userguide / opnfv_yardstick_tc058.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 TC058
9 *************************************
10
11 +-----------------------------------------------------------------------------+
12 |OpenStack Controller Virtual Router Service High Availability                |
13 |                                                                             |
14 +--------------+--------------------------------------------------------------+
15 |test case id  | OPNFV_YARDSTICK_TC058: OpenStack Controller Virtual Router   |
16 |              | Service High Availability                                    |
17 +--------------+--------------------------------------------------------------+
18 |test purpose  | This test case will verify the high availability of virtual  |
19 |              | routers(L3 agent) on controller node. When a virtual router  |
20 |              | service on a specified controller node is shut down, this    |
21 |              | test case will check whether the network of virtual machines |
22 |              | will be affected, and whether the attacked virtual router    |
23 |              | service will be recovered.                                   |
24 +--------------+--------------------------------------------------------------+
25 |test method   | This test case kills the processes of virtual router service |
26 |              | (l3-agent) on a selected controller node(the node holds the  |
27 |              | active l3-agent), then checks whether the network routing    |
28 |              | of virtual machines is OK and whether the killed service     |
29 |              | will be 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 load       |
37 |              | balance service. If there are multiple processes use the     |
38 |              | same name on the host, all of them are killed by this        |
39 |              | attacker.                                                    |
40 |              | 3) host: which is the name of a control node being attacked. |
41 |              |                                                              |
42 |              | In this case, this process name should set to "l3agent" ,    |
43 |              | for example                                                  |
44 |              | -fault_type: "kill-process"                                  |
45 |              | -process_name: "l3agent"                                     |
46 |              | -host: node1                                                 |
47 +--------------+--------------------------------------------------------------+
48 |monitors      | In this test case, two kinds of monitor are needed:          |
49 |              | 1. the "ip_status" monitor that pings a specific ip to check |
50 |              | the connectivity of this ip, which needs two parameters:     |
51 |              | 1) monitor_type: which is used for finding the monitor class |
52 |              | and related scripts. It should be always set to "ip_status"  |
53 |              | for this monitor.                                            |
54 |              | 2) ip_address: The ip to be pinged. In this case, ip_address |
55 |              | will be either an ip address of external network or an ip    |
56 |              | address of a virtual machine.                                |
57 |              | 3) host: The node on which ping will be executed, in this    |
58 |              | case the host will be a virtual machine.                     |
59 |              |                                                              |
60 |              | 2. the "process" monitor check whether a process is running  |
61 |              | on a specific node, which needs three parameters:            |
62 |              | 1) monitor_type: which used for finding the monitor class    |
63 |              | and related scripts. It should be always set to "process"    |
64 |              | for this monitor.                                            |
65 |              | 2) process_name: which is the process name for monitor. In   |
66 |              | this case, the process-name of monitor2 should be "l3agent"  |
67 |              | 3) host: which is the name of the node running the process   |
68 |              |                                                              |
69 |              | e.g.                                                         |
70 |              | monitor1-1:                                                  |
71 |              | -monitor_type: "ip_status"                                   |
72 |              | -host: 172.16.0.11                                           |
73 |              | -ip_address: 172.16.1.11                                     |
74 |              | monitor1-2:                                                  |
75 |              | -monitor_type: "ip_status"                                   |
76 |              | -host: 172.16.0.11                                           |
77 |              | -ip_address: 8.8.8.8                                         |
78 |              | monitor2:                                                    |
79 |              | -monitor_type: "process"                                     |
80 |              | -process_name: "l3agent"                                     |
81 |              | -host: node1                                                 |
82 +--------------+--------------------------------------------------------------+
83 |metrics       | In this test case, there are two metrics:                    |
84 |              | 1)service_outage_time: which indicates the maximum outage    |
85 |              | time (seconds) of the specified Openstack command request.   |
86 |              | 2)process_recover_time: which indicates the maximum time     |
87 |              | (seconds) from the process being killed to recovered         |
88 +--------------+--------------------------------------------------------------+
89 |test tool     | None. Self-developed.                                        |
90 +--------------+--------------------------------------------------------------+
91 |references    | ETSI NFV REL001                                              |
92 +--------------+--------------------------------------------------------------+
93 |configuration | This test case needs two configuration files:                |
94 |              | 1) test case file: opnfv_yardstick_tc058.yaml                |
95 |              | -Attackers: see above "attackers" description                |
96 |              | -Monitors: see above "monitors" description                  |
97 |              | -Steps: the test case execution step, see "test sequence"    |
98 |              | description below                                            |
99 |              |                                                              |
100 |              | 2)POD file: pod.yaml                                         |
101 |              | The POD configuration should record on pod.yaml first.       |
102 |              | the "host" item in this test case will use the node name in  |
103 |              | the pod.yaml.                                                |
104 +--------------+------+----------------------------------+--------------------+
105 |test sequence | description and expected result                              |
106 |              |                                                              |
107 +--------------+--------------------------------------------------------------+
108 |pre-test      | The test case image needs to be installed into Glance        |
109 |conditions    | with cachestat included in the image.                        |
110 |              |                                                              |
111 +--------------+--------------------------------------------------------------+
112 |step 1        | Two host VMs are booted, these two hosts are in two          |
113 |              | different networks, the networks are connected by a virtual  |
114 |              | router.                                                      |
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 4        | 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 5        | 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 |              | Virtual machines and network created in the test case will   |
145 |              | be destoryed.                                                |
146 |              |                                                              |
147 |              | Notice: This post-action uses 'lsb_release' command to check |
148 |              | the host linux distribution and determine the OpenStack      |
149 |              | service name to restart the process. Lack of 'lsb_release'   |
150 |              | on the host may cause failure to restart the process.        |
151 |              |                                                              |
152 +--------------+------+----------------------------------+--------------------+
153 |test verdict  | Fails only if SLA is not passed, or if there is a test case  |
154 |              | execution problem.                                           |
155 |              |                                                              |
156 +--------------+--------------------------------------------------------------+