Refactor Network partitioning test
- Changed Iptables rules to allow for external atomix cluster
- Add ip6table rules as well
- Add ip6table rule cleanup to cleanup script
Change-Id: Ie15c13ab5cca3937137f6a6bdaa7f407821f1576
diff --git a/TestON/tests/HA/dependencies/HA.py b/TestON/tests/HA/dependencies/HA.py
index 4b61c1e..88d122d 100644
--- a/TestON/tests/HA/dependencies/HA.py
+++ b/TestON/tests/HA/dependencies/HA.py
@@ -1429,7 +1429,6 @@
main.caseExplanation = "Test the methods of the distributed " +\
"primitives (counters and sets) throught the cli"
# DISTRIBUTED ATOMIC COUNTERS
- # Partitioned counters
main.step( "Increment then get a default counter on each node" )
pCounters = main.Cluster.command( "counterTestAddAndGet",
args=[ main.pCounterName ] )
@@ -3631,7 +3630,12 @@
oldLeaderCLI = ctrl
break
else: # FOR/ELSE statement
- main.log.error( "Leader election, could not find current leader" )
+ main.log.error( "Leader election, could not find current leader amongst active nodes" )
+ for ctrl in main.Cluster.controllers:
+ if oldLeader == ctrl.ipAddress:
+ oldLeaderCLI = ctrl
+ main.log.warn( "Old leader was found as node " + str( ctrl.ipAddress ) )
+ # Should we skip the next if statement then? There should be a new leader elected?
if oldLeader:
withdrawResult = oldLeaderCLI.electionTestWithdraw()
utilities.assert_equals(