Update HA Tests
- Add configuration for number of nodes to backup flow rules to
- Add some more conditions to exit the test early when failing
- Turn of flow objective intent compiler for more stability
Change-Id: Ie250c8e214b9f44d55abec95b0ef29839f0a4579
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
index 1b83edf..0da776c 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
@@ -1793,6 +1793,8 @@
main.log.debug( "Checking logs for errors on " + node.name + ":" )
main.log.warn( main.ONOSbench.checkLogs( node.ip_address ) )
+ main.log.debug( main.CLIs[0].roles( jsonFormat=False ) )
+
n = len( main.nodes ) # Number of nodes
p = ( ( n + 1 ) / 2 ) + 1 # Number of partitions
main.partition = [ 0 ] # ONOS node to partition, listed by index in main.nodes
@@ -1870,6 +1872,27 @@
main.cleanup()
main.exit()
+ main.step( "Checking ONOS nodes" )
+ nodeResults = utilities.retry( main.HA.nodesCheck,
+ False,
+ args=[main.activeNodes],
+ sleep=15,
+ attempts=5 )
+
+ utilities.assert_equals( expect=True, actual=nodeResults,
+ onpass="Nodes check successful",
+ onfail="Nodes check NOT successful" )
+
+ if not nodeResults:
+ for i in main.activeNodes:
+ cli = main.CLIs[i]
+ main.log.debug( "{} components not ACTIVE: \n{}".format(
+ cli.name,
+ cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ main.log.error( "Failed to start ONOS, stopping test" )
+ main.cleanup()
+ main.exit()
+
def CASE7( self, main ):
"""
Check state after ONOS failure
@@ -2611,6 +2634,10 @@
main.CLIs[i].name,
main.CLIs[i].sendline( "scr:list | grep -v ACTIVE" ) ) )
+ if not topoResult:
+ main.cleanup()
+ main.exit()
+
def CASE9( self, main ):
"""
Link s3-s28 down