From 19fc3286c9488a9c3f310a8b7364d5f6c8d57a9c Mon Sep 17 00:00:00 2001 From: Peter Gubka Date: Thu, 4 May 2017 06:21:21 +0200 Subject: [PATCH] Add bgp suites with explicit shard leader location Suites add 300k prefixes when rib owner is on the same/different odl node as default/topology (config and operational) shard leader. In PrefixcountKeywords.robot the http sessions are created with timeout=40. It is due to a big size of the http response when all 300k or 1M prefixes are requested for counting. Change-Id: I2e816df917402af71f51fe093553a072cc44e2a9 Signed-off-by: Peter Gubka --- csit/libraries/ShardStability.robot | 21 +++ .../bgpclustering/PrefixcountKeywords.robot | 16 +- ...epeer_pc_shm_300kroutes_shards_local.robot | 162 ++++++++++++++++++ ...peer_pc_shm_300kroutes_shards_remote.robot | 162 ++++++++++++++++++ csit/testplans/bgpcep-bgpclustering.txt | 6 +- 5 files changed, 362 insertions(+), 5 deletions(-) create mode 100644 csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_local.robot create mode 100644 csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_remote.robot diff --git a/csit/libraries/ShardStability.robot b/csit/libraries/ShardStability.robot index 015c2c95e3..c0044836a7 100644 --- a/csit/libraries/ShardStability.robot +++ b/csit/libraries/ShardStability.robot @@ -55,3 +55,24 @@ Shards_Stability_Compare_Same Collections.Log_Dictionary ${exp_details} Collections.Log_Dictionary ${details} Collections.Dictionaries_Should_Be_Equal ${exp_details} ${details} + +Set_Shard_Location + [Arguments] ${requested_leader_idx} + [Documentation] Move default/topology config/operational shard location to local or remote node as requested + ... towards the given member. + ClusterAdmin.Make_Leader_Local ${requested_leader_idx} default config + ClusterAdmin.Make_Leader_Local ${requested_leader_idx} default operational + ClusterAdmin.Make_Leader_Local ${requested_leader_idx} topology config + ClusterAdmin.Make_Leader_Local ${requested_leader_idx} topology operational + +Verify_Shard_Leader_Located_As_Expected + [Arguments] ${expected_leader_idx} + [Documentation] Verify default/topology config/operational shard leader location is as expected + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=default shard_type=config + BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=default shard_type=operational + BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=config + BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=operational + BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} diff --git a/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot b/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot index c235945f35..847358eb1c 100644 --- a/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot +++ b/csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot @@ -19,6 +19,7 @@ Resource ${CURDIR}/../../../libraries/ClusterManagement.robot Resource ${CURDIR}/../../../libraries/ShardStability.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot +Resource ${CURDIR}/../../../libraries/ClusterAdmin.robot *** Variables *** ${BGP_TOOL_LOG_LEVEL} info @@ -61,9 +62,9 @@ Setup_Everything [Documentation] Setup imported resources, SSH-login to tools system, ... create HTTP session, put Python tool to tools system. SetupUtils.Setup_Utils_For_Setup_And_Teardown - RequestsLibrary.Create_Session ${CONFIGURATION_1} http://${ODL_SYSTEM_1_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} timeout=10 max_retries=0 - RequestsLibrary.Create_Session ${CONFIGURATION_2} http://${ODL_SYSTEM_2_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} timeout=10 max_retries=0 - RequestsLibrary.Create_Session ${CONFIGURATION_3} http://${ODL_SYSTEM_3_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} timeout=10 max_retries=0 + RequestsLibrary.Create_Session ${CONFIGURATION_1} http://${ODL_SYSTEM_1_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} timeout=40 max_retries=0 + RequestsLibrary.Create_Session ${CONFIGURATION_2} http://${ODL_SYSTEM_2_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} timeout=40 max_retries=0 + RequestsLibrary.Create_Session ${CONFIGURATION_3} http://${ODL_SYSTEM_3_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH} timeout=40 max_retries=0 PrefixCounting.PC_Setup SSHLibrary.Set_Default_Configuration prompt=${TOOLS_SYSTEM_PROMPT} SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP} @@ -125,3 +126,12 @@ Verify_Bgp_Peer_Connection ${rsp}= RequestsLibrary.Get Request ${session} ${PEER_CHECK_URL}${peer_ip} BuiltIn.Log ${rsp.content} BuiltIn.Should_Be_Equal_As_Numbers ${exp_status_code} ${rsp.status_code} + +Set_Shard_Leaders_Location_And_Verify + [Arguments] ${requested_shard_localtion_idx} + [Documentation] Move default/topology config/operational shard location to local or remote node as requested + ... towards the given rib singleton instance location. + ShardStability.Set_Shard_Location ${requested_shard_localtion_idx} + BuiltIn.Wait_Until_Keyword_Succeeds 30s 5s ShardStability.Verify_Shard_Leader_Located_As_Expected ${requested_shard_localtion_idx} + ${init_shard_details} = ShardStability.Shards_Stability_Get_Details ${SHARD_MONITOR_LIST} + BuiltIn.Set_Suite_Variable ${init_shard_details} diff --git a/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_local.robot b/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_local.robot new file mode 100644 index 0000000000..750bc83f7d --- /dev/null +++ b/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_local.robot @@ -0,0 +1,162 @@ +*** Settings *** +Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used. +... +... Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved. +... +... This program and the accompanying materials are made available under the +... terms of the Eclipse Public License v1.0 which accompanies this distribution, +... and is available at http://www.eclipse.org/legal/epl-v10.html +... +... This suite uses play.py as single iBGP peer which talks to +... single controller in three node cluster configuration. +... Test suite checks changes of the the example-ipv4-topology on all nodes. +... RIB is not examined. +... +... singlepeer_pc_shm_300kroutes_shards_local: +... pc - prefix counting +... shm - shard monitoring (during the process of prefix advertizing) +... shards_local - default and topology shards are on the same node as rib owner +... singleton instance +Suite Setup PrefixcountKeywords.Setup_Everything +Suite Teardown PrefixcountKeywords.Teardown_Everything +Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing +Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed +Library SSHLibrary timeout=10s +Library RequestsLibrary +Resource ${CURDIR}/../../../variables/Variables.robot +Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot +Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot +Resource ${CURDIR}/../../../libraries/FailFast.robot +Resource ${CURDIR}/../../../libraries/KillPythonTool.robot +Resource ${CURDIR}/../../../libraries/PrefixCounting.robot +Resource ${CURDIR}/../../../libraries/SetupUtils.robot +Resource ${CURDIR}/../../../libraries/ClusterManagement.robot +Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot +Resource ${CURDIR}/../../../libraries/CompareStream.robot +Resource ${CURDIR}/PrefixcountKeywords.robot + +*** Variables *** +${COUNT} 300000 + +*** Test Cases *** +Get_Example_Bgp_Rib_Owner + [Documentation] Find an odl node which is able to accept incomming connection. It is a node, which is the owner of bgp rib, as it is a singleton service. + ... This node should be used for bgp peer to connect to. + ${rib_owner} ${rib_candidates}= ClusterManagement.Get_Owner_And_Successors_For_device example-bgp-rib org.opendaylight.mdsal.ServiceEntityType 1 + BuiltIn.Set_Suite_Variable ${rib_owner} ${rib_owner} + BuiltIn.Set_Suite_Variable ${rib_candidates} ${rib_candidates} + BuiltIn.Set_Suite_Variable ${rib_owner_node_id} ${ODL_SYSTEM_${rib_owner}_IP} + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_${rib_owner}_IP}:${RESTCONFPORT} auth=${AUTH} timeout=10 max_retries=0 + +Move_Shard_Leaders_If_Needed + [Documentation] Set shard leaders to expected location + PrefixcountKeywords.Set_Shard_Leaders_Location_And_Verify ${rib_owner} + +Check_For_Empty_Ipv4_Topology_Before_Talking_1 + [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_Before_Talking_2 + [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_Before_Talking_3 + [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Reconfigure_ODL_To_Accept_Connection + [Documentation] Configure BGP peer module with initiate-connection set to false. + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION} + [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed + +Start_Talking_BGP_Speaker + [Documentation] Start Python speaker to connect to ODL. + PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3} + +Wait_For_Stable_Talking_Ipv4_Topology_1 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 1. + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + ... shards_list=${SHARD_MONITOR_LIST} shards_details=${init_shard_details} + +Wait_For_Stable_Talking_Ipv4_Topology_2 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 2. + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Wait_For_Stable_Talking_Ipv4_Topology_3 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 3. + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_Talking_Ipv4_Topology_Count_1 + [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_Talking_Ipv4_Topology_Count_2 + [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 2. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_Talking_Ipv4_Topology_Count_3 + [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 3. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Kill_Talking_BGP_Speaker + [Documentation] Abort the Python speaker. Also, attempt to stop failing fast. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BGPSpeaker.Kill_BGP_Speaker + FailFast.Do_Not_Fail_Fast_From_Now_On + +Wait_For_Stable_Ipv4_Topology_After_Listening_1 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1. + [Tags] critical + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Wait_For_Stable_Ipv4_Topology_After_Listening_2 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 2. + [Tags] critical + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Wait_For_Stable_Ipv4_Topology_After_Listening_3 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 3. + [Tags] critical + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_After_Listening_1 + [Documentation] Example-ipv4-topology should be empty now as seen from node 1. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_After_Listening_2 + [Documentation] Example-ipv4-topology should be empty now as seen from node 2. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_After_Listening_3 + [Documentation] Example-ipv4-topology should be empty now as seen from node 3. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Delete_Bgp_Peer_Configuration + [Documentation] Revert the BGP configuration to the original state: without any configured peers. + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... INITIATE=false BGP_RIB=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION} diff --git a/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_remote.robot b/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_remote.robot new file mode 100644 index 0000000000..9476f3a914 --- /dev/null +++ b/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_remote.robot @@ -0,0 +1,162 @@ +*** Settings *** +Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used. +... +... Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved. +... +... This program and the accompanying materials are made available under the +... terms of the Eclipse Public License v1.0 which accompanies this distribution, +... and is available at http://www.eclipse.org/legal/epl-v10.html +... +... This suite uses play.py as single iBGP peer which talks to +... single controller in three node cluster configuration. +... Test suite checks changes of the the example-ipv4-topology on all nodes. +... RIB is not examined. +... +... singlepeer_pc_shm_300kroutes_shards_remote: +... pc - prefix counting +... shm - shard monitoring (during the process of prefix advertizing) +... shards_remote - default and topology shards are on a different node as rib owner +... singleton instance +Suite Setup PrefixcountKeywords.Setup_Everything +Suite Teardown PrefixcountKeywords.Teardown_Everything +Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing +Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed +Library SSHLibrary timeout=10s +Library RequestsLibrary +Resource ${CURDIR}/../../../variables/Variables.robot +Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot +Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot +Resource ${CURDIR}/../../../libraries/FailFast.robot +Resource ${CURDIR}/../../../libraries/KillPythonTool.robot +Resource ${CURDIR}/../../../libraries/PrefixCounting.robot +Resource ${CURDIR}/../../../libraries/SetupUtils.robot +Resource ${CURDIR}/../../../libraries/ClusterManagement.robot +Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot +Resource ${CURDIR}/../../../libraries/CompareStream.robot +Resource ${CURDIR}/PrefixcountKeywords.robot + +*** Variables *** +${COUNT} 300000 + +*** Test Cases *** +Get_Example_Bgp_Rib_Owner + [Documentation] Find an odl node which is able to accept incomming connection. It is a node, which is the owner of bgp rib, as it is a singleton service. + ... This node should be used for bgp peer to connect to. + ${rib_owner} ${rib_candidates}= ClusterManagement.Get_Owner_And_Successors_For_device example-bgp-rib org.opendaylight.mdsal.ServiceEntityType 1 + BuiltIn.Set_Suite_Variable ${rib_owner} ${rib_owner} + BuiltIn.Set_Suite_Variable ${rib_candidates} ${rib_candidates} + BuiltIn.Set_Suite_Variable ${rib_owner_node_id} ${ODL_SYSTEM_${rib_owner}_IP} + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_${rib_owner}_IP}:${RESTCONFPORT} auth=${AUTH} timeout=10 max_retries=0 + +Move_Shard_Leaders_If_Needed + [Documentation] Set shard leaders to expected location + PrefixcountKeywords.Set_Shard_Leaders_Location_And_Verify @{rib_candidates}[0] + +Check_For_Empty_Ipv4_Topology_Before_Talking_1 + [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_Before_Talking_2 + [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_Before_Talking_3 + [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Reconfigure_ODL_To_Accept_Connection + [Documentation] Configure BGP peer module with initiate-connection set to false. + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION} + [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed + +Start_Talking_BGP_Speaker + [Documentation] Start Python speaker to connect to ODL. + PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3} + +Wait_For_Stable_Talking_Ipv4_Topology_1 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 1. + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + ... shards_list=${SHARD_MONITOR_LIST} shards_details=${init_shard_details} + +Wait_For_Stable_Talking_Ipv4_Topology_2 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 2. + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Wait_For_Stable_Talking_Ipv4_Topology_3 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 3. + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_Talking_Ipv4_Topology_Count_1 + [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_Talking_Ipv4_Topology_Count_2 + [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 2. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_Talking_Ipv4_Topology_Count_3 + [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 3. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Kill_Talking_BGP_Speaker + [Documentation] Abort the Python speaker. Also, attempt to stop failing fast. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + BGPSpeaker.Kill_BGP_Speaker + FailFast.Do_Not_Fail_Fast_From_Now_On + +Wait_For_Stable_Ipv4_Topology_After_Listening_1 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1. + [Tags] critical + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Wait_For_Stable_Ipv4_Topology_After_Listening_2 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 2. + [Tags] critical + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Wait_For_Stable_Ipv4_Topology_After_Listening_3 + [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 3. + [Tags] critical + PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_After_Listening_1 + [Documentation] Example-ipv4-topology should be empty now as seen from node 1. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_After_Listening_2 + [Documentation] Example-ipv4-topology should be empty now as seen from node 2. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Check_For_Empty_Ipv4_Topology_After_Listening_3 + [Documentation] Example-ipv4-topology should be empty now as seen from node 3. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY} + +Delete_Bgp_Peer_Configuration + [Documentation] Revert the BGP configuration to the original state: without any configured peers. + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... INITIATE=false BGP_RIB=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION} diff --git a/csit/testplans/bgpcep-bgpclustering.txt b/csit/testplans/bgpcep-bgpclustering.txt index 4e50da11c7..c899f622c3 100644 --- a/csit/testplans/bgpcep-bgpclustering.txt +++ b/csit/testplans/bgpcep-bgpclustering.txt @@ -5,8 +5,10 @@ # and is available at http://www.eclipse.org/legal/epl-v10.html # Place the suites in run order: -integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_prefixcount_300kroutes.robot +integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_local.robot +integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_remote.robot integration/test/csit/suites/bgpcep/bgpclustering/030_singlepeer_prefixcount_1Mroutes.robot integration/test/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot -integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes.robot +integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_local.robot +integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_300kroutes_shards_remote.robot integration/test/csit/suites/bgpcep/bgpclustering/singlepeer_pc_shm_1Mroutes.robot -- 2.36.6