go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/integration/restarts/basic_restarts.robot (about) 1 *** Settings *** 2 Resource ../../../libraries/kubernetes/Restarts_Setup.robot 3 Resource ../../../libraries/kubernetes/KubeTestOperations.robot 4 5 Resource ../../../variables/${VARIABLES}_variables.robot 6 7 Library SSHLibrary 8 9 Force Tags integration 10 Suite Setup Run Keywords 11 ... KubeSetup.Kubernetes Suite Setup ${CLUSTER_ID} 12 ... AND Restarts Suite Setup with ${1} VNFs at ${1} memifs each and ${1} non-VPP containers 13 Suite Teardown Restarts Suite Teardown 14 Test Setup Run Keywords 15 ... Set Test Variable @{upgrade_durations} @{EMPTY} 16 ... AND Set Test Variable @{restart_durations} @{EMPTY} 17 Test Teardown Run Keywords 18 ... Log Many ${upgrade_durations} ${restart_durations} 19 ... AND Recreate Topology If Test Failed 20 21 Documentation Test suite for Kubernetes pod restarts using a single VNF pod 22 ... and a single non-VPP pod. 23 ... 24 ... Restart performed through kubernetes pod deletion and through 25 ... segmentation fault signal sent to VPP. 26 ... 27 ... Connectivity verified using "ping" command to and from the VNF 28 ... and non-VPP containers. 29 30 *** Variables *** 31 ${VARIABLES}= common 32 ${ENV}= common 33 ${CLUSTER_ID}= INTEGRATION1 34 ${vnf0_ip}= 192.168.1.1 35 ${novpp0_ip}= 192.168.1.2 36 @{novpp_pods}= novpp-0 37 @{vnf_pods}= vnf-vpp-0 38 39 ${repeats}= 5 40 41 *** Test Cases *** 42 Basic restart scenario - VNF 43 Repeat Keyword ${repeats} Basic restart scenario - VNF 44 45 Basic restart scenario - noVPP 46 Repeat Keyword ${repeats} Basic restart scenario - noVPP 47 48 Basic restart scenario - VSwitch 49 Repeat Keyword ${repeats} Basic restart scenario - VSwitch 50 51 Basic Restart Scenario - VSwitch and VNF 52 Repeat Keyword ${repeats} Basic Restart Scenario - VSwitch and VNF 53 54 Basic Restart Scenario - VSwitch and noVPP 55 Repeat Keyword ${repeats} Basic Restart Scenario - VSwitch and noVPP 56 57 Basic Restart Scenario - VSwitch, noVPP and VNF 58 Repeat Keyword ${repeats} Basic Restart Scenario - VSwitch, noVPP and VNF 59 60 Basic Restart Scenario - full topology in sequence etcd-vswitch-pods-sfc 61 Repeat Keyword ${repeats} Basic Restart Scenario - full topology in sequence etcd-vswitch-pods-sfc 62 63 Basic Restart Scenario - full topology in sequence etcd-vswitch-sfc-pods 64 Repeat Keyword ${repeats} Basic Restart Scenario - full topology in sequence etcd-vswitch-sfc-pods 65 66 Basic Restart Scenario - full topology in sequence etcd-sfc-vswitch-pods 67 Repeat Keyword ${repeats} Basic Restart Scenario - full topology in sequence etcd-sfc-vswitch-pods 68 69 Basic Restart Scenario - full topology in sequence etcd-sfc-pods-vswitch 70 Repeat Keyword ${repeats} Basic Restart Scenario - full topology in sequence etcd-sfc-pods-vswitch 71 72 #TODO: verify connectivity with traffic (iperf,tcpkali,...) longer than memif ring size 73 #TODO: measure pod restart time 74 75 *** Keywords *** 76 Recreate Topology If Test Failed 77 [Documentation] After a failed test, delete the kubernetes topology 78 ... and create it again. 79 BuiltIn.Run Keyword If Test Failed Run Keywords 80 ... Log Pods For Debug ${testbed_connection} 81 ... AND Cleanup_Restarts_Deployment_On_Cluster ${testbed_connection} 82 ... AND Restarts Suite Setup with ${1} VNFs at ${1} memifs each and ${1} non-VPP containers 83 84 Basic restart scenario - VNF 85 [Documentation] Restart VNF node, ping it's IP address from the non-VPP 86 ... node until a reply is received, then verify connectivity both ways. 87 88 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 89 Trigger Pod Restart - Pod Deletion ${testbed_connection} vnf-vpp-0 90 Wait For Reconnect - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s duration_list_name=${upgrade_durations} 91 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 92 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 93 94 Trigger Pod Restart - VPP SIGSEGV ${vnf_pods[0]} 95 Wait For Reconnect - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s duration_list_name=${restart_durations} 96 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 97 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 98 99 Basic restart scenario - noVPP 100 [Documentation] Restart non-VPP node, ping it's IP address from the VNF 101 ... node until a reply is received, then verify connectivity both ways. 102 103 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 104 Trigger Pod Restart - Pod Deletion ${testbed_connection} novpp-0 105 Wait For Reconnect - VPP Ping ${vnf_pods[0]} ${novpp0_ip} timeout=120s duration_list_name=${upgrade_durations} 106 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 107 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 108 109 Basic restart scenario - VSwitch 110 [Documentation] Restart the vswitch, ping the VNF's IP address from 111 ... the non-VPP node until a reply is received, then verify connectivity 112 ... both ways. 113 114 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 115 Trigger Pod Restart - Pod Deletion ${testbed_connection} ${vswitch_pod_name} vswitch=${TRUE} 116 Wait For Reconnect - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s duration_list_name=${upgrade_durations} 117 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 118 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 119 120 Trigger Pod Restart - VPP SIGSEGV ${vswitch_pod_name} 121 Wait For Reconnect - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s duration_list_name=${restart_durations} 122 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 123 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 124 125 Basic Restart Scenario - VSwitch and VNF 126 [Documentation] Restart vswitch and VNF, ping the VNF's IP address from 127 ... the non-VPP node until a reply is received, then verify connectivity 128 ... both ways. 129 130 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 131 Trigger Pod Restart - Pod Deletion ${testbed_connection} vnf-vpp-0 132 Trigger Pod Restart - Pod Deletion ${testbed_connection} ${vswitch_pod_name} vswitch=${TRUE} 133 Wait For Reconnect - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s duration_list_name=${upgrade_durations} 134 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 135 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 136 137 Trigger Pod Restart - VPP SIGSEGV ${vnf_pods[0]} 138 Trigger Pod Restart - VPP SIGSEGV ${vswitch_pod_name} 139 Wait For Reconnect - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s duration_list_name=${restart_durations} 140 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 141 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 142 143 Basic Restart Scenario - VSwitch and noVPP 144 [Documentation] Restart vswitch and non-VPP pod, ping the non-VPP 145 ... pod's IP address from the VNF node until a reply is received, then 146 ... verify connectivity both ways. 147 148 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 149 Trigger Pod Restart - Pod Deletion ${testbed_connection} novpp-0 150 Trigger Pod Restart - Pod Deletion ${testbed_connection} ${vswitch_pod_name} vswitch=${TRUE} 151 Wait For Reconnect - VPP Ping ${vnf_pods[0]} ${novpp0_ip} timeout=120s duration_list_name=${upgrade_durations} 152 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 153 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 154 155 Trigger Pod Restart - Pod Deletion ${testbed_connection} novpp-0 156 Trigger Pod Restart - VPP SIGSEGV ${vswitch_pod_name} 157 Wait For Reconnect - VPP Ping ${vnf_pods[0]} ${novpp0_ip} timeout=120s duration_list_name=${restart_durations} 158 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 159 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 160 161 Basic Restart Scenario - VSwitch, noVPP and VNF 162 [Documentation] Restart vswitch, VNF and non-VPP pod, ping the non-VPP 163 ... pod's IP address from the VNF node until a reply is received, then 164 ... verify connectivity both ways. 165 166 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 167 Trigger Pod Restart - Pod Deletion ${testbed_connection} vnf-vpp-0 168 Trigger Pod Restart - Pod Deletion ${testbed_connection} novpp-0 169 Trigger Pod Restart - Pod Deletion ${testbed_connection} ${vswitch_pod_name} vswitch=${TRUE} 170 Wait For Reconnect - VPP Ping ${vnf_pods[0]} ${novpp0_ip} timeout=120s duration_list_name=${upgrade_durations} 171 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 172 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 173 174 Trigger Pod Restart - VPP SIGSEGV ${vnf_pods[0]} 175 Trigger Pod Restart - Pod Deletion ${testbed_connection} novpp-0 176 Trigger Pod Restart - VPP SIGSEGV ${vswitch_pod_name} 177 Wait For Reconnect - VPP Ping ${vnf_pods[0]} ${novpp0_ip} timeout=120s duration_list_name=${restart_durations} 178 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 179 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 180 181 Basic Restart Scenario - full topology in sequence etcd-vswitch-pods-sfc 182 [Documentation] Restart the full topology, then bring it back up in the 183 ... specified sequence and verify connectivity between VNF and non-VPP 184 ... pods. 185 186 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 187 Restart Topology With Startup Sequence etcd vswitch vnf novpp sfc 188 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 189 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 190 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 191 192 Basic Restart Scenario - full topology in sequence etcd-vswitch-sfc-pods 193 [Documentation] Restart the full topology, then bring it back up in the 194 ... specified sequence and verify connectivity between VNF and non-VPP 195 ... pods. 196 197 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 198 Restart Topology With Startup Sequence etcd vswitch sfc vnf novpp 199 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 200 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 201 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 202 203 Basic Restart Scenario - full topology in sequence etcd-sfc-vswitch-pods 204 [Documentation] Restart the full topology, then bring it back up in the 205 ... specified sequence and verify connectivity between VNF and non-VPP 206 ... pods. 207 208 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 209 Restart Topology With Startup Sequence etcd sfc vswitch vnf novpp 210 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 211 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 212 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip} 213 214 Basic Restart Scenario - full topology in sequence etcd-sfc-pods-vswitch 215 [Documentation] Restart the full topology, then bring it back up in the 216 ... specified sequence and verify connectivity between VNF and non-VPP 217 ... pods. 218 219 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 220 Restart Topology With Startup Sequence etcd sfc vnf novpp vswitch 221 Ping Until Success - Unix Ping ${novpp_pods[0]} ${vnf0_ip} timeout=120s 222 Verify Pod Connectivity - Unix Ping ${novpp_pods[0]} ${vnf0_ip} 223 Verify Pod Connectivity - VPP Ping ${vnf_pods[0]} ${novpp0_ip}