blob: 16b4b27d3ac6181ca61ca2a2ef3d4768f1f813bb [file] [log] [blame]
Thomas Vachuska13a93f32016-11-22 14:15:04 -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-cluster-restart"
18 description="ONOS cluster restart and recovery">
19 <group name="Cluster-Restart" if="${OC2}">
20 <group name="Fail">
21 <parallel var="${OC#}">
22 <step name="Node-Stop-${#}" exec="onos-service ${OC#} stop"/>
23 <step name="Wait-for-Stop-${#}" requires="~Node-Stop-${#}"
24 exec="onos-wait-for-stop ${OC#}"/>
25 </parallel>
26 </group>
27
28 <group name="Recover" requires="~Fail">
29 <parallel var="${OC#}">
30 <step name="Node-Start-${#}" exec="onos-service ${OC#} start"/>
31 <step name="Wait-for-Start-${#}" requires="~Node-Start-${#}"
32 exec="onos-wait-for-start ${OC#}"/>
33 </parallel>
34 </group>
35
36 <group name="Validate-Recovery" requires="~Recover">
37 <parallel var="${OC#}">
38 <step name="Check-Nodes-${#}"
39 exec="onos-check-nodes ${OC#}"/>
40
41 <step name="Check-Components-${#}" requires="~Check-Nodes-${#}"
42 exec="onos-check-components ${OC#}"/>
43
44 <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}"
45 exec="onos-check-logs --ignore-store-exceptions ${OC#}"/>
46 <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}"
47 exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/>
48
49 <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}"
50 exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/>
51 </parallel>
52 </group>
53
54 <step name="Balance-Masters-Again" requires="~Validate-Recovery"
55 exec="onos ${OC1} balance-masters"/>
56 </group>
57
58 <group name="Cluster-Restart-NA" unless="${OC2}">
59 <step name="No-Op" exec="echo Scenario not supported for this cell size"/>
60 </group>
61
62</scenario>