Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 1 | <!-- |
Brian O'Connor | ce2a03d | 2017-08-03 19:21:03 -0700 | [diff] [blame] | 2 | ~ Copyright 2016-present Open Networking Foundation |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 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}"> |
Thomas Vachuska | 0a4dd38 | 2016-12-07 11:28:04 -0800 | [diff] [blame] | 20 | <import file="${ONOS_SCENARIOS}/shutdown.xml" namespace="Cluster-Fail"/> |
| 21 | <import file="${ONOS_SCENARIOS}/startup.xml" namespace="Cluster-Recover"/> |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 22 | |
Thomas Vachuska | 0a4dd38 | 2016-12-07 11:28:04 -0800 | [diff] [blame] | 23 | <step name="Breathe" exec="sleep 5" requires="Cluster-Fail.Shutdown"/> |
| 24 | <dependency name="Cluster-Recover.Startup" requires="Breathe"/> |
Thomas Vachuska | 822bc14 | 2016-11-22 15:47:23 -0800 | [diff] [blame] | 25 | |
Thomas Vachuska | 0a4dd38 | 2016-12-07 11:28:04 -0800 | [diff] [blame] | 26 | <group name="Validate-Recovery" requires="Cluster-Recover.Startup"> |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 27 | <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 Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 44 | <step name="Balance-Masters-Again" requires="Validate-Recovery" |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 45 | 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> |