Merge "Add rpm,image directories and SLA options to Livemigration"
[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 |test case id  | OPNFV_YARDSTICK_TC058:OpenStack Controller Virtual Router    |
15 |              | Service High Availability                                    |
16 +--------------+--------------------------------------------------------------+
17 |test purpose  | This test case will verify the high availability of virtual  |
18 |              | routers(L3 agent) on controller node. When a virtual router  |
19 |              | service on a specified controller node is shut down, this    |
20 |              | test case will check whether the network of virtual machines |
21 |              | will be affected, and whether the attacked virtual router    |
22 |              | service will be recovered.                                   |
23 +--------------+--------------------------------------------------------------+
24 |test method   | This test case kills the processes of virtual router service |
25 |              | (l3-agent) on a selected controller node(the node holds the  |
26 |              | active l3-agent), then checks whether the network routing    |
27 |              | of virtual machines is OK and whether the killed service     |
28 |              | will be recovered.                                           |
29 +--------------+--------------------------------------------------------------+
30 |attackers     | In this test case, an attacker called "kill-process" is      |
31 |              | needed. This attacker includes three parameters:             |
32 |              | 1) fault_type: which is used for finding the attacker's      |
33 |              | scripts. It should be always set to "kill-process" in this   |
34 |              | test case.                                                   |
35 |              | 2) process_name: which is the process name of the load       |
36 |              | balance service. If there are multiple processes use the     |
37 |              | same name on the host, all of them are killed by this        |
38 |              | attacker.                                                    |
39 |              | 3) host: which is the name of a control node being attacked. |
40 |              |                                                              |
41 |              | In this case, this process name should set to "l3agent" ,    |
42 |              | for example                                                  |
43 |              | -fault_type: "kill-process"                                  |
44 |              | -process_name: "l3agent"                                     |
45 |              | -host: node1                                                 |
46 +--------------+--------------------------------------------------------------+
47 |monitors      | In this test case, two kinds of monitor are needed:          |
48 |              | 1. the "ip_status" monitor that pings a specific ip to check |
49 |              | the connectivity of this ip, which needs two parameters:     |
50 |              | 1) monitor_type: which is used for finding the monitor class |
51 |              | and related scripts. It should be always set to "ip_status"  |
52 |              | for this monitor.                                            |
53 |              | 2) ip_address: The ip to be pinged. In this case, ip_address |
54 |              | will be either an ip address of external network or an ip    |
55 |              | address of a virtual machine.                                |
56 |              | 3) host: The node on which ping will be executed, in this    |
57 |              | case the host will be a virtual machine.                     |
58 |              |                                                              |
59 |              | 2. the "process" monitor check whether a process is running  |
60 |              | on a specific node, which needs three parameters:            |
61 |              | 1) monitor_type: which used for finding the monitor class    |
62 |              | and related scripts. It should be always set to "process"    |
63 |              | for this monitor.                                            |
64 |              | 2) process_name: which is the process name for monitor. In   |
65 |              | this case, the process-name of monitor2 should be "l3agent"  |
66 |              | 3) host: which is the name of the node running the process   |
67 |              |                                                              |
68 |              | e.g.                                                         |
69 |              | monitor1-1:                                                  |
70 |              | -monitor_type: "ip_status"                                   |
71 |              | -host: 172.16.0.11                                           |
72 |              | -ip_address: 172.16.1.11                                     |
73 |              | monitor1-2:                                                  |
74 |              | -monitor_type: "ip_status"                                   |
75 |              | -host: 172.16.0.11                                           |
76 |              | -ip_address: 8.8.8.8                                         |
77 |              | monitor2:                                                    |
78 |              | -monitor_type: "process"                                     |
79 |              | -process_name: "l3agent"                                     |
80 |              | -host: node1                                                 |
81 +--------------+--------------------------------------------------------------+
82 |metrics       | In this test case, there are two metrics:                    |
83 |              | 1)service_outage_time: which indicates the maximum outage    |
84 |              | time (seconds) of the specified Openstack command request.   |
85 |              | 2)process_recover_time: which indicates the maximum time     |
86 |              | (seconds) from the process being killed to recovered         |
87 +--------------+--------------------------------------------------------------+
88 |test tool     | None. Self-developed.                                        |
89 +--------------+--------------------------------------------------------------+
90 |references    | ETSI NFV REL001                                              |
91 +--------------+--------------------------------------------------------------+
92 |configuration | This test case needs two configuration files:                |
93 |              | 1) test case file: opnfv_yardstick_tc058.yaml                |
94 |              | -Attackers: see above "attackers" description                |
95 |              | -Monitors: see above "monitors" description                  |
96 |              | -Steps: the test case execution step, see "test sequence"    |
97 |              | description below                                            |
98 |              |                                                              |
99 |              | 2)POD file: pod.yaml                                         |
100 |              | The POD configuration should record on pod.yaml first.       |
101 |              | the "host" item in this test case will use the node name in  |
102 |              | the pod.yaml.                                                |
103 +--------------+------+----------------------------------+--------------------+
104 |test sequence | description and expected result                              |
105 |              |                                                              |
106 +--------------+--------------------------------------------------------------+
107 |pre-test      | The test case image needs to be installed into Glance        |
108 |conditions    | with cachestat included in the image.                        |
109 |              |                                                              |
110 +--------------+--------------------------------------------------------------+
111 |step 1        | Two host VMs are booted, these two hosts are in two different|
112 |              | networks, the networks are connected by a virtual router     |
113 |              |                                                              |
114 +--------------+--------------------------------------------------------------+
115 |step 1        | start monitors:                                              |
116 |              | each monitor will run with independently process             |
117 |              |                                                              |
118 |              | Result: The monitor info will be collected.                  |
119 |              |                                                              |
120 +--------------+--------------------------------------------------------------+
121 |step 2        | do attacker: connect the host through SSH, and then execute  |
122 |              | the kill process script with param value specified by        |
123 |              | "process_name"                                               |
124 |              |                                                              |
125 |              | Result: Process will be killed.                              |
126 |              |                                                              |
127 +--------------+--------------------------------------------------------------+
128 |step 4        | stop monitors after a period of time specified by            |
129 |              | "waiting_time"                                               |
130 |              |                                                              |
131 |              | Result: The monitor info will be aggregated.                 |
132 |              |                                                              |
133 +--------------+--------------------------------------------------------------+
134 |step 5        | verify the SLA                                               |
135 |              |                                                              |
136 |              | Result: The test case is passed or not.                      |
137 |              |                                                              |
138 +--------------+------+----------------------------------+--------------------+
139 |post-action   | It is the action when the test cases exist. It will check    |
140 |              | the status of the specified process on the host, and restart |
141 |              | the process if it is not running for next test cases.        |
142 |              | Virtual machines and network created in the test case will   |
143 |              | be destoryed.                                                |
144 |              |                                                              |
145 +--------------+------+----------------------------------+--------------------+
146 |test verdict  | Fails only if SLA is not passed, or if there is a test case  |
147 |              | execution problem.                                           |
148 +--------------+--------------------------------------------------------------+