Fix controller cluster test 02/42602/3
authorLuis Gomez <ecelgp@gmail.com>
Wed, 27 Jul 2016 02:14:18 +0000 (19:14 -0700)
committerVratko Polák <vrpolak@cisco.com>
Wed, 27 Jul 2016 12:15:39 +0000 (12:15 +0000)
Due to recent commit we need to put isolated instances in down state
otherwise leader cannot peform its duty of joining new nodes.

Change-Id: I2175a7adfa33a671959cef6b16442d9cb85816c2
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
csit/suites/controller/Clustering_Datastore/car_outage_corners.robot
csit/variables/clustering/member_down.json [new file with mode: 0644]

index 3d39e170e91e7e29f4fe53468fe1cb7c9876e023..8e10a1bc6fbc34e28f1a20da77d68f27089e24ef 100644 (file)
@@ -35,11 +35,17 @@ ${MAJORITY_START_I}    200
 ${MEMBER_START_TIMEOUT}    300s
 @{SHARD_NAME_LIST}    car
 ${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CLUSTER_DIR}    ${CURDIR}/../../../variables/clustering
 
 *** Test Cases ***
 Kill_Majority_Of_The_Followers
-    [Documentation]    Kill half plus one car Follower members.
+    [Documentation]    Kill half plus one car Follower members and set reviving followers down (otherwsise tipping followers cannot join cluster).
     ClusterManagement.Kill_Members_From_List_Or_All    member_index_list=${list_of_killing}    confirm=True
+    : FOR    ${index}    IN    @{list_of_reviving}
+    \    ${data}    OperatingSystem.Get File    ${CLUSTER_DIR}/member_down.json
+    \    ${member_ip} =    Collections.Get_From_Dictionary    ${ClusterManagement__index_to_ip_mapping}    ${index}
+    \    ${data}    String.Replace String    ${data}    {member_ip}    ${member_ip}
+    \    TemplatedRequests.Post_To_Uri    uri=jolokia    data=${data}    content_type=${HEADERS}    accept=${ACCEPT_EMPTY}    session=${car_leader_session}
 
 Attempt_To_Add_Cars_To_Leader
     [Documentation]    Adding cars should fail, as majority of Followers are down.
diff --git a/csit/variables/clustering/member_down.json b/csit/variables/clustering/member_down.json
new file mode 100644 (file)
index 0000000..71c9801
--- /dev/null
@@ -0,0 +1,6 @@
+{
+   "type": "EXEC",
+   "mbean": "akka:type=Cluster",
+   "operation": "down",
+   "arguments" : ["akka.tcp://opendaylight-cluster-data@{member_ip}:2550"]
+}