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}"> |
Thomas Vachuska | 7618889 | 2017-11-28 16:27:22 -0800 | [diff] [blame] | 20 | <step name="Node-Death" exec="onos-power ${OC1} off"/> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 21 | <step name="Validate-Death" requires="Node-Death" |
Jordan Halterman | dd0e04c | 2017-12-20 18:12:26 -0800 | [diff] [blame] | 22 | exec="onos-check-node-status ${OC1} INACTIVE"/> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 23 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 24 | <group name="Validate-Normal-Operation" requires="Validate-Death"> |
| 25 | <step name="Check-Summary" |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 26 | 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 Vachuska | 7618889 | 2017-11-28 16:27:22 -0800 | [diff] [blame] | 38 | <group name="Recover" requires="~Validate-Normal-Operation"> |
| 39 | <step name="Node-Start" exec="onos-power ${OC1} on"/> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 40 | <step name="Wait-for-Start" requires="~Node-Start" |
| 41 | exec="onos-wait-for-start ${OC1}"/> |
| 42 | </group> |
| 43 | |
Thomas Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 44 | <group name="Validate-Recovery" requires="Recover"> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 45 | <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 Vachuska | 27ece8f | 2016-11-11 10:03:11 -0800 | [diff] [blame] | 53 | exec="onos-check-logs --ignore-store-exceptions ${OC#}"/> |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 54 | <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 Vachuska | 3101b9b | 2016-11-28 15:51:02 -0800 | [diff] [blame] | 62 | <step name="Balance-Masters-Again" requires="Validate-Recovery" |
Thomas Vachuska | e112535 | 2016-11-09 14:06:51 -0800 | [diff] [blame] | 63 | 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> |