From f3a8fa05e971ab65fbff9204a37e61005323f9f1 Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Tue, 30 Oct 2018 11:01:20 -0700 Subject: [PATCH] Change kill -9 to graceful stop command 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 --- csit/libraries/controller/DdbCommons.robot | 4 ++-- .../Clustering_Datastore/buycar_failover.robot | 2 +- .../Clustering_Datastore/car_failover_crud.robot | 12 ++++++------ .../Clustering_Datastore/car_outage_corners.robot | 14 +++++++------- .../car_persistence_recovery.robot | 6 +++--- .../restart_odl_with_tell_based_false.robot | 6 +++--- .../restart_odl_with_tell_based_true.robot | 6 +++--- .../singleton_service/global_rpc_kill.robot | 14 +++++++------- csit/suites/mdsal/binding_v1/binding-parent.robot | 4 ++-- 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/csit/libraries/controller/DdbCommons.robot b/csit/libraries/controller/DdbCommons.robot index c98222cd19..9db3aab598 100644 --- a/csit/libraries/controller/DdbCommons.robot +++ b/csit/libraries/controller/DdbCommons.robot @@ -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 diff --git a/csit/suites/controller/Clustering_Datastore/buycar_failover.robot b/csit/suites/controller/Clustering_Datastore/buycar_failover.robot index 40751ddcdf..c3cb5d241d 100644 --- a/csit/suites/controller/Clustering_Datastore/buycar_failover.robot +++ b/csit/suites/controller/Clustering_Datastore/buycar_failover.robot @@ -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 diff --git a/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot b/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot index 4ada866f02..b2014f8e1b 100644 --- a/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot +++ b/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot @@ -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 diff --git a/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot b/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot index 0f0fbc48bc..13782311c6 100644 --- a/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot +++ b/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot @@ -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} diff --git a/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot b/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot index 9ea49c0b07..09cf87db6d 100644 --- a/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot +++ b/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot @@ -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). diff --git a/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot b/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot index d8574f53f7..f5b63a3f12 100644 --- a/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot +++ b/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot @@ -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/. diff --git a/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot b/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot index be016e6a58..90ce3bf37b 100644 --- a/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot +++ b/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot @@ -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/. diff --git a/csit/suites/controller/singleton_service/global_rpc_kill.robot b/csit/suites/controller/singleton_service/global_rpc_kill.robot index bdf4303696..3b105fa494 100644 --- a/csit/suites/controller/singleton_service/global_rpc_kill.robot +++ b/csit/suites/controller/singleton_service/global_rpc_kill.robot @@ -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 diff --git a/csit/suites/mdsal/binding_v1/binding-parent.robot b/csit/suites/mdsal/binding_v1/binding-parent.robot index 2d8304e2a4..e3a200fca3 100644 --- a/csit/suites/mdsal/binding_v1/binding-parent.robot +++ b/csit/suites/mdsal/binding_v1/binding-parent.robot @@ -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. -- 2.36.6