Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 1 | <!-- |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | ~ Copyright 2016-present Open Networking Foundation |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -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-single-node" |
| 18 | description="ONOS cluster single node failure and recovery"> |
| 19 | <group name="Single-Node-Failure" if="${OC2}"> |
| 20 | <step name="Node-Death" exec="onos-die ${OC1}"/> |
| 21 | |
| 22 | <step name="Validate-Death" requires="Node-Death" |
| 23 | exec="onos-check-node-status ${OC2} ${OC1} INACTIVE"/> |
| 24 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 25 | <group name="Validate-Normal-Operation" requires="Validate-Death"> |
| 26 | <step name="Check-Summary" |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 27 | exec="onos-check-summary ${OC2} [0-9]* ${OTD} ${OTL} ${OTH}"/> |
| 28 | |
| 29 | <step name="Balance-Masters" requires="~Check-Summary" |
| 30 | exec="onos ${OC2} balance-masters"/> |
| 31 | |
| 32 | <step name="Check-Summary-Again" requires="~Balance-Masters" delay="5" |
| 33 | exec="onos-check-summary ${OC2} [0-9]* ${OTD} ${OTL} ${OTH}"/> |
| 34 | |
| 35 | <step name="Check-Flows" requires="~Balance-Masters" delay="5" |
| 36 | exec="onos-check-flows ${OC2}"/> |
| 37 | </group> |
| 38 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 39 | <group name="Recover" requires="Validate-Normal-Operation"> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 40 | <step name="Node-Start" |
| 41 | exec="onos-service ${OC1} start"/> |
| 42 | |
| 43 | <step name="Wait-for-Start" requires="~Node-Start" |
| 44 | exec="onos-wait-for-start ${OC1}"/> |
| 45 | </group> |
| 46 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 47 | <group name="Validate-Recovery" requires="Recover"> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 48 | <parallel var="${OC#}"> |
| 49 | <step name="Check-Nodes-${#}" |
| 50 | exec="onos-check-nodes ${OC#}"/> |
| 51 | |
| 52 | <step name="Check-Components-${#}" requires="~Check-Nodes-${#}" |
| 53 | exec="onos-check-components ${OC#}"/> |
| 54 | |
| 55 | <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}" |
Thomas Vachuska | 27ece8f | 2016-11-11 10:03:11 -0800 | [diff] [blame] | 56 | exec="onos-check-logs --ignore-store-exceptions ${OC#}"/> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 57 | <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}" |
| 58 | exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/> |
| 59 | |
| 60 | <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}" |
| 61 | exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/> |
| 62 | </parallel> |
| 63 | </group> |
| 64 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 65 | <step name="Balance-Masters-Again" requires="Validate-Recovery" |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 66 | exec="onos ${OC1} balance-masters"/> |
| 67 | </group> |
| 68 | |
| 69 | <group name="Single-Node-NA" unless="${OC2}"> |
| 70 | <step name="No-Op" exec="echo Scenario not supported for this cell size"/> |
| 71 | </group> |
| 72 | |
| 73 | |
| 74 | </scenario> |