blob: 0abadbd0dfb20d8a9cd195fb265ae84d83acc756 [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-${#}"
Thomas Vachuskadb9b7f42016-11-29 16:40:09 -080024 exec="onos-wait-for-stop ${OC#} ${ONOS_KILL_OPTION}"/>
Thomas Vachuska13a93f32016-11-22 14:15:04 -080025 </parallel>
26 </group>
27
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080028 <step name="Breathe" exec="sleep 5" requires="Fail"/>
Thomas Vachuska822bc142016-11-22 15:47:23 -080029
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080030 <group name="Recover" requires="~Breathe,Fail">
Thomas Vachuska13a93f32016-11-22 14:15:04 -080031 <parallel var="${OC#}">
32 <step name="Node-Start-${#}" exec="onos-service ${OC#} start"/>
33 <step name="Wait-for-Start-${#}" requires="~Node-Start-${#}"
34 exec="onos-wait-for-start ${OC#}"/>
35 </parallel>
36 </group>
37
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080038 <group name="Validate-Recovery" requires="Recover">
Thomas Vachuska13a93f32016-11-22 14:15:04 -080039 <parallel var="${OC#}">
40 <step name="Check-Nodes-${#}"
41 exec="onos-check-nodes ${OC#}"/>
42
43 <step name="Check-Components-${#}" requires="~Check-Nodes-${#}"
44 exec="onos-check-components ${OC#}"/>
45
46 <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}"
47 exec="onos-check-logs --ignore-store-exceptions ${OC#}"/>
48 <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}"
49 exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/>
50
51 <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}"
52 exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/>
53 </parallel>
54 </group>
55
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080056 <step name="Balance-Masters-Again" requires="Validate-Recovery"
Thomas Vachuska13a93f32016-11-22 14:15:04 -080057 exec="onos ${OC1} balance-masters"/>
58 </group>
59
60 <group name="Cluster-Restart-NA" unless="${OC2}">
61 <step name="No-Op" exec="echo Scenario not supported for this cell size"/>
62 </group>
63
64</scenario>