blob: bf69e9692869da9326e74a554a36da9eb08d7b21 [file] [log] [blame]
Thomas Vachuskae1125352016-11-09 14:06:51 -08001<!--
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 ~ Copyright 2016-present Open Networking Foundation
Thomas Vachuskae1125352016-11-09 14:06:51 -08003 ~
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
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080025 <group name="Validate-Normal-Operation" requires="Validate-Death">
26 <step name="Check-Summary"
Thomas Vachuskae1125352016-11-09 14:06:51 -080027 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
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080039 <group name="Recover" requires="Validate-Normal-Operation">
Thomas Vachuskae1125352016-11-09 14:06:51 -080040 <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
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080047 <group name="Validate-Recovery" requires="Recover">
Thomas Vachuskae1125352016-11-09 14:06:51 -080048 <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
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080065 <step name="Balance-Masters-Again" requires="Validate-Recovery"
Thomas Vachuskae1125352016-11-09 14:06:51 -080066 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>