blob: b05d6e302bd135f2e6fa2e5a7fcf5ea0dcdb0cfc [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}">
Thomas Vachuska76188892017-11-28 16:27:22 -080020 <step name="Node-Death" exec="onos-power ${OC1} off"/>
Thomas Vachuskae1125352016-11-09 14:06:51 -080021 <step name="Validate-Death" requires="Node-Death"
Jordan Haltermandd0e04c2017-12-20 18:12:26 -080022 exec="onos-check-node-status ${OC1} INACTIVE"/>
Thomas Vachuskae1125352016-11-09 14:06:51 -080023
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080024 <group name="Validate-Normal-Operation" requires="Validate-Death">
25 <step name="Check-Summary"
Thomas Vachuskae1125352016-11-09 14:06:51 -080026 exec="onos-check-summary ${OC2} [0-9]* ${OTD} ${OTL} ${OTH}"/>
27
28 <step name="Balance-Masters" requires="~Check-Summary"
29 exec="onos ${OC2} balance-masters"/>
30
31 <step name="Check-Summary-Again" requires="~Balance-Masters" delay="5"
32 exec="onos-check-summary ${OC2} [0-9]* ${OTD} ${OTL} ${OTH}"/>
33
34 <step name="Check-Flows" requires="~Balance-Masters" delay="5"
35 exec="onos-check-flows ${OC2}"/>
36 </group>
37
Thomas Vachuska76188892017-11-28 16:27:22 -080038 <group name="Recover" requires="~Validate-Normal-Operation">
39 <step name="Node-Start" exec="onos-power ${OC1} on"/>
Thomas Vachuskae1125352016-11-09 14:06:51 -080040 <step name="Wait-for-Start" requires="~Node-Start"
41 exec="onos-wait-for-start ${OC1}"/>
42 </group>
43
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080044 <group name="Validate-Recovery" requires="Recover">
Thomas Vachuskae1125352016-11-09 14:06:51 -080045 <parallel var="${OC#}">
46 <step name="Check-Nodes-${#}"
47 exec="onos-check-nodes ${OC#}"/>
48
49 <step name="Check-Components-${#}" requires="~Check-Nodes-${#}"
50 exec="onos-check-components ${OC#}"/>
51
52 <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}"
Thomas Vachuska27ece8f2016-11-11 10:03:11 -080053 exec="onos-check-logs --ignore-store-exceptions ${OC#}"/>
Thomas Vachuskae1125352016-11-09 14:06:51 -080054 <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}"
55 exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/>
56
57 <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}"
58 exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/>
59 </parallel>
60 </group>
61
Thomas Vachuska3101b9b2016-11-28 15:51:02 -080062 <step name="Balance-Masters-Again" requires="Validate-Recovery"
Thomas Vachuskae1125352016-11-09 14:06:51 -080063 exec="onos ${OC1} balance-masters"/>
64 </group>
65
66 <group name="Single-Node-NA" unless="${OC2}">
67 <step name="No-Op" exec="echo Scenario not supported for this cell size"/>
68 </group>
69
70
71</scenario>