Merge "bugfix: tc023 miss description and tc050-58 wrong description"
[yardstick.git] / tests / opnfv / test_cases / opnfv_yardstick_tc057.yaml
1 ##############################################################################
2 # Copyright (c) 2017 14_ykl@tongji.edu.cn and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10
11 schema: "yardstick:task:0.1"
12 description: >
13     Yardstick TC057 config file;
14     HA test case: OpenStack Controller Cluster Management Service High Availability.
15
16 {% set file = file or '/etc/yardstick/pod.yaml' %}
17 {% set vip_mgmt = vip_mgmt or 'vip__management' %}
18 {% set vip_vrouter = vip_vrouter or 'vip__vrouter' %}
19 {% set attack_host = attack_host or 'node1' %}
20 {% set check_host = check_host or 'node2' %}
21 {% set monitor_time = monitor_time or 10 %}
22 {% set monitor_number = monitor_number or 3 %}
23
24 scenarios:
25   -
26     type: "GeneralHA"
27     options:
28       attackers:
29         -
30           fault_type: "general-attacker"
31           host: {{attack_host}}
32           key: "kill-process"
33           attack_key: "kill-corosync"
34           action_parameter:
35             process_name: "corosync"
36
37       monitors:
38         -
39           monitor_type: "openstack-cmd"
40           key: "check-nova-service"
41           command_name: "openstack image list"
42           monitor_time: {{monitor_time}}
43           monitor_number: {{monitor_number}}
44           sla:
45             max_outage_time: 5
46
47         -
48           monitor_type: "openstack-cmd"
49           key: "check-neutron-service"
50           command_name: "openstack network list"
51           monitor_time: {{monitor_time}}
52           monitor_number: {{monitor_number}}
53           sla:
54             max_outage_time: 5
55
56         -
57           monitor_type: "openstack-cmd"
58           key: "check-keystone-service"
59           command_name: "openstack user list"
60           monitor_time: {{monitor_time}}
61           monitor_number: {{monitor_number}}
62           sla:
63             max_outage_time: 5
64
65         -
66           monitor_type: "openstack-cmd"
67           key: "check-heat-service"
68           command_name: "openstack stack list"
69           monitor_time: {{monitor_time}}
70           monitor_number: {{monitor_number}}
71           sla:
72             max_outage_time: 5
73
74       operations:
75         -
76           operation_type: "general-operation"
77           key: "get-mgmt-vip-host"
78           operation_key: "get-vip-host"
79           host: {{check_host}}
80           action_parameter:
81             vip_name: {{vip_mgmt}}
82           return_parameter:
83             all: "@vip_mgmt_host"
84
85         -
86           operation_type: "general-operation"
87           key: "get-router-vip-host"
88           operation_key: "get-vip-host"
89           host: {{check_host}}
90           action_parameter:
91             vip_name: {{vip_vrouter}}
92           return_parameter:
93             all: "@vip_router_host"
94
95       resultCheckers:
96         -
97           checker_type: "general-result-checker"
98           key: "check-rabbitmq-master"
99           checker_key: "pacemaker-resource-checker"
100           host: {{check_host}}
101           parameter:
102             resource_name: "p_rabbitmq-server"
103             resource_host: "@vip_mgmt_host"
104           expectedValue: "Masters"
105           condition: "in"
106
107         -
108           checker_type: "general-result-checker"
109           key: "check-conntrackd-master"
110           checker_key: "pacemaker-resource-checker"
111           host: {{check_host}}
112           parameter:
113             resource_name: "p_conntrackd"
114             resource_host: "@vip_router_host"
115           expectedValue: "Masters"
116           condition: "in"
117
118       steps:
119         -
120           actionKey: "kill-process"
121           actionType: "attacker"
122           index: 1
123
124         -
125           actionKey: "check-nova-service"
126           actionType: "monitor"
127           index: 2
128
129         -
130           actionKey: "check-neutron-service"
131           actionType: "monitor"
132           index: 3
133
134         -
135           actionKey: "check-keystone-service"
136           actionType: "monitor"
137           index: 4
138
139         -
140           actionKey: "check-heat-service"
141           actionType: "monitor"
142           index: 5
143
144         -
145           actionKey: "get-mgmt-vip-host"
146           actionType: "operation"
147           index: 6
148
149         -
150           actionKey: "check-rabbitmq-master"
151           actionType: "resultchecker"
152           index: 7
153
154         -
155           actionKey: "get-router-vip-host"
156           actionType: "operation"
157           index: 8
158
159         -
160           actionKey: "check-conntrackd-master"
161           actionType: "resultchecker"
162           index: 9
163
164
165     nodes:
166       {{attack_host}}: {{attack_host}}.LF
167       {{check_host}}: {{check_host}}.LF
168     runner:
169       type: Duration
170       duration: 1
171     sla:
172       outage_time: 5
173       action: monitor
174
175 context:
176   type: Node
177   name: LF
178   file: {{file}}