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