Change kill -9 to graceful stop command 59/77359/2
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 30 Oct 2018 18:01:20 +0000 (11:01 -0700)
committerSam Hague <shague@redhat.com>
Tue, 30 Oct 2018 20:22:34 +0000 (20:22 +0000)
Since it's accepted that 'kill -9' is the extreme and
uncommon way to stop ODL karaf, and we have nobody
that can currently try to figure out and fix the problems
we run in to when restarting that way, we'll move
to using the graceful (bin/stop) method of stopping
karaf.

Change-Id: Ie90c19a34dc6ef0ef96611c7f2bafe736524dbb1
JIRA:CONTROLLER-1849
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/controller/DdbCommons.robot
csit/suites/controller/Clustering_Datastore/buycar_failover.robot
csit/suites/controller/Clustering_Datastore/car_failover_crud.robot
csit/suites/controller/Clustering_Datastore/car_outage_corners.robot
csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot
csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot
csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot
csit/suites/controller/singleton_service/global_rpc_kill.robot
csit/suites/mdsal/binding_v1/binding-parent.robot

index c98222cd19a53bba8b83fdcec7a1c6fe6f9b6333..9db3aab59804548a2f1d35eeb382138dd7ae7d4b 100644 (file)
@@ -377,8 +377,8 @@ Verify_Shard_Replica_Not_Present
     BuiltIn.Should_Contain    ${text}    "status":404    javax.management.InstanceNotFoundException
 
 Restart_Test_Templ
-    [Documentation]    Kill every odl node and start again.
-    ClusterManagement.Kill_Members_From_List_Or_All
+    [Documentation]    Stop every odl node and start again.
+    ClusterManagement.Stop_Members_From_List_Or_All
     ClusterManagement.Clean_Directories_On_List_Or_All    tmp_dir=/tmp
     ClusterManagement.Start_Members_From_List_Or_All
     BuiltIn.Wait_Until_Keyword_Succeeds    300s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}    verify_restconf=True
index 40751ddcdfb58b1d29c2595252439d0b822df784..c3cb5d241d83064d4c99fe73d1e371ed9040141f 100644 (file)
@@ -61,7 +61,7 @@ Buy_Cars_On_Follower_And_Verify
 
 Reboot_People_Leader
     [Documentation]    Previous people Leader is rebooted. We should never stop the people first follower, this is where people are registered.
-    ClusterManagement.Kill_Single_Member    ${people_leader_index}    confirm=True
+    ClusterManagement.Stop_Single_Member    ${people_leader_index}    confirm=True
     ClusterManagement.Start_Single_Member    ${people_leader_index}    wait_for_sync=True    timeout=${MEMBER_START_TIMEOUT}
     BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
 
index 4ada866f026add85b244f1f2412402477dbb3e7a..b2014f8e1b736423c4aef4231d2c536f4c61d237 100644 (file)
@@ -8,8 +8,8 @@ Documentation     Suite mixing basic operations with restart of car Leader.
 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               This test kills the current leader of the "car" shard and then executes CRD
-...               operations on the new leader and a new follower. The killed member is brought back.
+...               This test stops the current leader of the "car" shard and then executes CRD
+...               operations on the new leader and a new follower. The stopped member is brought back.
 ...               This suite uses 3 different car sets, same size but different starting ID.
 ...
 ...               Other models and shards (people, car-people) are not accessed by this suite.
@@ -42,9 +42,9 @@ Add_Original_Cars_On_Old_Leader_And_Verify
     : FOR    ${session}    IN    @{ClusterManagement__session_list}
     \    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
 
-Kill_Original_Car_Leader
-    [Documentation]    Kill the car Leader to cause a new leader to get elected.
-    ClusterManagement.Kill_Single_Member    ${car_leader_index}    confirm=True
+Stop_Original_Car_Leader
+    [Documentation]    Stop the car Leader to cause a new leader to get elected.
+    ClusterManagement.Stop_Single_Member    ${car_leader_index}    confirm=True
 
 Wait_For_New_Leader
     [Documentation]    Wait until new car Leader is elected.
@@ -94,7 +94,7 @@ See_Follower_Cars_On_New_Followers
     \    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
 
 Start_Old_Car_Leader
-    [Documentation]    Start the killed member without deleting the persisted data.
+    [Documentation]    Start the stopped member without deleting the persisted data.
     ClusterManagement.Start_Single_Member    ${car_leader_index}    wait_for_sync=True    timeout=${MEMBER_START_TIMEOUT}
     BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
 
index 0f0fbc48bc952089d6252041eb520154ccd6e998..13782311c608396d1b7271c729e3e13c2be5a287 100644 (file)
@@ -8,7 +8,7 @@ Documentation     Cluster suite for testing minimal and sum-minimal member popul
 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
 ...
 ...
-...               This test kills majority of the followers and verifies car addition is not possible,
+...               This test stops majority of the followers and verifies car addition is not possible,
 ...               then resumes single follower (first from original list) and checks that addition works.
 ...               Then remaining members are brought up.
 ...               Leader member is always up and assumed to remain Leading during the whole suite run.
@@ -40,10 +40,10 @@ ${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 and set reviving followers down (otherwsise tipping followers cannot join cluster).
-    ...    Mark most of killed members as explicitly down, to allow the surviving leader make progress.
-    ClusterManagement.Kill_Members_From_List_Or_All    member_index_list=${list_of_killing}    confirm=True
+Stop_Majority_Of_The_Followers
+    [Documentation]    Stop half plus one car Follower members and set reviving followers down (otherwsise tipping followers cannot join cluster).
+    ...    Mark most of stopped members as explicitly down, to allow the surviving leader make progress.
+    ClusterManagement.Stop_Members_From_List_Or_All    member_index_list=${list_of_stopping}    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}
@@ -108,5 +108,5 @@ Set_Additional_Variables
     BuiltIn.Set_Suite_Variable    \${list_of_tipping}    ${tipping_list}
     ${revive_list} =    Collections.Get_Slice_From_List    ${car_follower_indices}    ${half_followers}    ${number_followers}
     BuiltIn.Set_Suite_Variable    \${list_of_reviving}    ${revive_list}
-    ${kill_list} =    Collections.Combine_Lists    ${tipping_list}    ${revive_list}
-    BuiltIn.Set_Suite_Variable    \${list_of_killing}    ${kill_list}
+    ${stop_list} =    Collections.Combine_Lists    ${tipping_list}    ${revive_list}
+    BuiltIn.Set_Suite_Variable    \${list_of_stopping}    ${stop_list}
index 9ea49c0b0748dfa1f8152e8628322379d2b7831a..09cf87db6d5761980b8bc6c13597e59fa6c6d55f 100644 (file)
@@ -34,9 +34,9 @@ Add_Cars_On_Leader_And_Verify
     : FOR    ${session}    IN    @{ClusterManagement__session_list}
     \    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}
 
-Kill_All_Members
-    [Documentation]    Kill all controllers.
-    ClusterManagement.Kill_Members_From_List_Or_All    confirm=True
+Stop_All_Members
+    [Documentation]    Stop all controllers.
+    ClusterManagement.Stop_Members_From_List_Or_All    confirm=True
 
 Start_All_Members
     [Documentation]    Start all controllers (should restore the persisted data).
index d8574f53f7dc827ee85acb4c3a0b98777daf79dc..f5b63a3f1232385418540e3294bb4ef914c35a76 100644 (file)
@@ -22,9 +22,9 @@ Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
 ${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
 
 *** Test Cases ***
-Kill_All_Members
-    [Documentation]    Kill every odl node.
-    ClusterManagement.Kill_Members_From_List_Or_All
+Stop_All_Members
+    [Documentation]    Stop every odl node.
+    ClusterManagement.Stop_Members_From_List_Or_All
 
 Unset_Tell_Based_Protocol_Usage
     [Documentation]    Comment out the flag usage in config file. Also clean most data except data/log/.
index be016e6a583fa99d25e67a03c7137a8f0dc101ec..90ce3bf37bf2fc8e4ce22bebe3d8786f7770e86f 100644 (file)
@@ -22,9 +22,9 @@ Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
 ${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
 
 *** Test Cases ***
-Kill_All_Members
-    [Documentation]    Kill every odl node.
-    ClusterManagement.Kill_Members_From_List_Or_All
+Stop_All_Members
+    [Documentation]    Stop every odl node.
+    ClusterManagement.Stop_Members_From_List_Or_All
 
 Set_Tell_Based_Protocol_Usage
     [Documentation]    Un-comment the flag usage in config file. Also clean most data except data/log/.
index bdf4303696b133023d36b0654d2515fd95a78d58..3b105fa494d8823085bb16af60fb4f6140cd2555 100644 (file)
@@ -32,18 +32,18 @@ Get_Basic_Rpc_Test_Owner
     [Documentation]    Find a service owner and successors.
     Get_Present_Brt_Owner_And_Successors    1    store=${True}
 
-Rpc_Before_Killing_On_Owner
+Rpc_Before_Stopping_On_Owner
     [Documentation]    Run rpc on the service owner.
     Run_Rpc    ${brt_owner}
 
-Rpc_Before_Kill_On_Successors
+Rpc_Before_Stop_On_Successors
     [Documentation]    Run rpc on non owher cluster nodes.
     : FOR    ${idx}    IN    @{brt_successors}
     \    Run_Rpc    ${idx}
 
-Kill_Current_Owner_Member
-    [Documentation]    Kill cluster node which is the owner.
-    ClusterManagement.Kill_Single_Member    ${brt_owner}
+Stop_Current_Owner_Member
+    [Documentation]    Stop cluster node which is the owner.
+    ClusterManagement.Stop_Single_Member    ${brt_owner}
     BuiltIn.Set Suite variable    ${old_brt_owner}    ${brt_owner}
     BuiltIn.Set Suite variable    ${old_brt_successors}    ${brt_successors}
 
@@ -58,8 +58,8 @@ Rpc_On_Remained_Cluster_Nodes
     : FOR    ${idx}    IN    @{old_brt_successors}
     \    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    Run_Rpc    ${idx}
 
-Restart_Killed_Member
-    [Documentation]    Restart killed node
+Restart_Stopped_Member
+    [Documentation]    Restart stopped node
     ClusterManagement.Start_Single_Member    ${old_brt_owner}
 
 Verify_New_Owner_Remained_After_Rejoin
index 2d8304e2a4fe1db0edc773057c93db40a3d2722e..e3a200fca346516e346074c739bafa97303c3bfa 100644 (file)
@@ -43,8 +43,8 @@ ${POM_FILENAME}    binding-parent-test.xml
 
 *** Test Cases ***
 Kill_Odl
-    [Documentation]    The ODL instance consumes resources, kill it.
-    ClusterManagement.Kill_Members_From_List_Or_All
+    [Documentation]    The ODL instance consumes resources, stop it.
+    ClusterManagement.Stop_Members_From_List_Or_All
 
 Detect_Config_Version
     [Documentation]    Examine ODL installation to figure out which version of binding-parent should be used.