| <!-- |
| ~ Copyright 2016-present Open Networking Foundation |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <scenario name="ha-cluster-restart" |
| description="ONOS cluster restart and recovery"> |
| <group name="Cluster-Restart" if="${OC2}"> |
| <import file="${ONOS_SCENARIOS}/shutdown.xml" namespace="Cluster-Fail"/> |
| <import file="${ONOS_SCENARIOS}/startup.xml" namespace="Cluster-Recover"/> |
| |
| <step name="Breathe" exec="sleep 5" requires="Cluster-Fail.Shutdown"/> |
| <dependency name="Cluster-Recover.Startup" requires="Breathe"/> |
| |
| <group name="Validate-Recovery" requires="Cluster-Recover.Startup"> |
| <parallel var="${OC#}"> |
| <step name="Check-Nodes-${#}" |
| exec="onos-check-nodes ${OC#}"/> |
| |
| <step name="Check-Components-${#}" requires="~Check-Nodes-${#}" |
| exec="onos-check-components ${OC#}"/> |
| |
| <step name="Check-Logs-${#}" requires="~Check-Nodes-${#}" |
| exec="onos-check-logs --ignore-store-exceptions ${OC#}"/> |
| <step name="Check-Apps-${#}" requires="~Check-Nodes-${#}" |
| exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"/> |
| |
| <step name="Check-Summary-${#}" requires="~Check-Nodes-${#},~Check-Apps-${#}" |
| exec="onos-check-summary ${OC#} [0-9]* ${OTD} ${OTL} ${OTH}"/> |
| </parallel> |
| </group> |
| |
| <step name="Balance-Masters-Again" requires="Validate-Recovery" |
| exec="onos ${OC1} balance-masters"/> |
| </group> |
| |
| <group name="Cluster-Restart-NA" unless="${OC2}"> |
| <step name="No-Op" exec="echo Scenario not supported for this cell size"/> |
| </group> |
| |
| </scenario> |