Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 1 | <!-- |
| 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 Vachuska | db9b7f4 | 2016-11-29 16:40:09 -0800 | [diff] [blame] | 24 | exec="onos-wait-for-stop ${OC#} ${ONOS_KILL_OPTION}"/> |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 25 | </parallel> |
| 26 | </group> |
| 27 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 28 | <step name="Breathe" exec="sleep 5" requires="Fail"/> |
Thomas Vachuska | 822bc14 | 2016-11-22 15:47:23 -0800 | [diff] [blame] | 29 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 30 | <group name="Recover" requires="~Breathe,Fail"> |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 31 | <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 Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 38 | <group name="Validate-Recovery" requires="Recover"> |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 39 | <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 Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 56 | <step name="Balance-Masters-Again" requires="Validate-Recovery" |
Thomas Vachuska | 13a93f3 | 2016-11-22 14:15:04 -0800 | [diff] [blame] | 57 | 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> |