blob: fa20c61e3406a93b233bcf30d34ea30bbd8ec78b [file] [log] [blame]
Thomas Vachuska13a93f32016-11-22 14:15:04 -08001<!--
Brian O'Connorce2a03d2017-08-03 19:21:03 -07002 ~ Copyright 2016-present Open Networking Foundation
Thomas Vachuska13a93f32016-11-22 14:15:04 -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-cluster-restart"
18 description="ONOS cluster restart and recovery">
19 <group name="Cluster-Restart" if="${OC2}">
Thomas Vachuska0a4dd382016-12-07 11:28:04 -080020 <import file="${ONOS_SCENARIOS}/shutdown.xml" namespace="Cluster-Fail"/>
21 <import file="${ONOS_SCENARIOS}/startup.xml" namespace="Cluster-Recover"/>
Thomas Vachuska13a93f32016-11-22 14:15:04 -080022
Thomas Vachuska0a4dd382016-12-07 11:28:04 -080023 <step name="Breathe" exec="sleep 5" requires="Cluster-Fail.Shutdown"/>
24 <dependency name="Cluster-Recover.Startup" requires="Breathe"/>
Thomas Vachuska822bc142016-11-22 15:47:23 -080025
Thomas Vachuska0a4dd382016-12-07 11:28:04 -080026 <group name="Validate-Recovery" requires="Cluster-Recover.Startup">
Thomas Vachuska13a93f32016-11-22 14:15:04 -080027 <parallel var="${OC#}">
28 <step name="Check-Nodes-${#}"
29 exec="onos-check-nodes ${OC#}"/>
30
31 <step name="Check-Components-${#}" requires="~Check-Nodes-${#}"
32 exec="onos-check-components ${OC#}"/>
33
34 <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}"
35 exec="onos-check-logs --ignore-store-exceptions ${OC#}"/>
36 <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}"
37 exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/>
38
39 <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}"
40 exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/>
41 </parallel>
42 </group>
43
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080044 <step name="Balance-Masters-Again" requires="Validate-Recovery"
Thomas Vachuska13a93f32016-11-22 14:15:04 -080045 exec="onos ${OC1} balance-masters"/>
46 </group>
47
48 <group name="Cluster-Restart-NA" unless="${OC2}">
49 <step name="No-Op" exec="echo Scenario not supported for this cell size"/>
50 </group>
51
52</scenario>