blob: a48822a077c37418977265f1ce3ccde51df893f6 [file] [log] [blame]
Thomas Vachuskae1125352016-11-09 14:06:51 -08001<!--
2 ~ Copyright 2016-present Open Networking Laboratory
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15 -->
16
17<scenario name="ha-single-node"
18 description="ONOS cluster single node failure and recovery">
19 <group name="Single-Node-Failure" if="${OC2}">
20 <step name="Node-Death" exec="onos-die ${OC1}"/>
21
22 <step name="Validate-Death" requires="Node-Death"
23 exec="onos-check-node-status ${OC2} ${OC1} INACTIVE"/>
24
25 <group name="Validate-Normal-Operation">
26 <step name="Check-Summary" requires="~Validate-Death"
27 exec="onos-check-summary ${OC2} [0-9]* ${OTD} ${OTL} ${OTH}"/>
28
29 <step name="Balance-Masters" requires="~Check-Summary"
30 exec="onos ${OC2} balance-masters"/>
31
32 <step name="Check-Summary-Again" requires="~Balance-Masters" delay="5"
33 exec="onos-check-summary ${OC2} [0-9]* ${OTD} ${OTL} ${OTH}"/>
34
35 <step name="Check-Flows" requires="~Balance-Masters" delay="5"
36 exec="onos-check-flows ${OC2}"/>
37 </group>
38
39 <group name="Recover" requires="~Validate-Normal-Operation">
40 <step name="Node-Start"
41 exec="onos-service ${OC1} start"/>
42
43 <step name="Wait-for-Start" requires="~Node-Start"
44 exec="onos-wait-for-start ${OC1}"/>
45 </group>
46
47 <group name="Validate-Recovery" requires="~Recover">
48 <parallel var="${OC#}">
49 <step name="Check-Nodes-${#}"
50 exec="onos-check-nodes ${OC#}"/>
51
52 <step name="Check-Components-${#}" requires="~Check-Nodes-${#}"
53 exec="onos-check-components ${OC#}"/>
54
55 <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}"
Thomas Vachuska27ece8f2016-11-11 10:03:11 -080056 exec="onos-check-logs --ignore-store-exceptions ${OC#}"/>
Thomas Vachuskae1125352016-11-09 14:06:51 -080057 <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}"
58 exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/>
59
60 <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}"
61 exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/>
62 </parallel>
63 </group>
64
65 <step name="Balance-Masters-Again" requires="~Validate-Recovery"
66 exec="onos ${OC1} balance-masters"/>
67 </group>
68
69 <group name="Single-Node-NA" unless="${OC2}">
70 <step name="No-Op" exec="echo Scenario not supported for this cell size"/>
71 </group>
72
73
74</scenario>