Skip to content

Commit f6da725

Browse files
committed
Moving Fat Flow sanity tests to Serial scripts as it fails when running in parallel.
Closes: CEM-29034 Signed-off-by: Sendilraj Perumalswamy <[email protected]> Change-Id: I16b11b7b0de1b47987656362f33834eb0371e554
1 parent e54d757 commit f6da725

File tree

4 files changed

+139
-31
lines changed

4 files changed

+139
-31
lines changed

scripts/vrouter/test_fat_flow.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,3 @@ def is_test_applicable(self):
549549
@preposttest_wrapper
550550
def test_fat_flow_lbaasv2(self):
551551
raise self.skipTest("Skipping Test. LBaas is NOT supported for IPv6")
552-
553-
@test.attr(type=['cb_sanity', 'sanity'])
554-
def test_fat_flow_intra_vn_inter_node(self):
555-
self.inputs.set_af('dual')
556-
super(FatFlowIpv6, self).test_fat_flow_intra_vn_inter_node()

scripts/vrouter/test_fat_flow_aggr.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -273,32 +273,6 @@ def test_fat_flow_aggr_dest_icmp_intra_vn_inter_node(self):
273273
self.inputs.set_af('dual')
274274
super(FatFlowAggrIpv6, self).test_fat_flow_aggr_dest_icmp_intra_vn_inter_node()
275275

276-
@test.attr(type=['sanity','dev_reg'])
277-
@preposttest_wrapper
278-
def test_fat_flow_aggr_dest_udp_inter_vn_inter_node(self):
279-
"""
280-
Description: Verify fat flow prefix aggr dest (IPv6) for intra-vn inter-node
281-
Steps:
282-
1. Create 2 VNs with IPv6 subnets and launch 3 VMs.2 client VMs in VN1 on same node
283-
and server VM in VN2 on different node.
284-
Client 1 in subnet 1, Client 2 in the next subnet.
285-
Policy p1 configured to allow udp traffic between VN1 and VN2.
286-
2. On server VM, config fat flow aggr prefix dest IPv6 len 125 for UDP port 55.
287-
3. From both the client VMs, send ICMP6 traffic to the server VM twice with diff. src ports
288-
Pass criteria:
289-
1. On the remote CN, expect 2 pairs ( 1 for client 1, 1 for client 2)
290-
of IPv6 fat flows with prefix aggregated for the src IPs
291-
(VM to fabric, Prefix Aggr Dest: Aggregation happens for SRC IPs)
292-
2. On client VM compute nodes, expect 4 pairs of IPv6 flows and on server compute,
293-
expect 2 pairs of IPv6 flows
294-
3. On server compute node, flow's source port should be 0 for fat flows
295-
296-
Maintainer: [email protected]
297-
298-
"""
299-
self.inputs.set_af('dual')
300-
super(FatFlowAggrIpv6, self).test_fat_flow_aggr_dest_udp_inter_vn_inter_node()
301-
302276
@test.attr(type=['dev_reg'])
303277
@preposttest_wrapper
304278
def test_fat_flow_aggr_dest_ignore_src_udp_inter_vn_inter_node(self):
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
from common.vrouter.base import BaseVrouterTest
2+
from tcutils.wrappers import preposttest_wrapper
3+
import test
4+
from tcutils.util import get_random_name, is_v6
5+
import random
6+
from common.neutron.lbaasv2.base import BaseLBaaSTest
7+
from common.servicechain.config import ConfigSvcChain
8+
from common.servicechain.verify import VerifySvcChain
9+
10+
AF_TEST = 'v6'
11+
12+
class FatFlowAggrSerial(BaseVrouterTest, BaseLBaaSTest):
13+
14+
@classmethod
15+
def setUpClass(cls):
16+
super(FatFlowAggrSerial, cls).setUpClass()
17+
18+
@classmethod
19+
def tearDownClass(cls):
20+
super(FatFlowAggrSerial, cls).tearDownClass()
21+
22+
@test.attr(type=['dev_reg'])
23+
@preposttest_wrapper
24+
def test_fat_flow_aggr_dest_udp_inter_vn_inter_node(self):
25+
""":
26+
Description: Verify fat flow prefix aggr dest (IPv4) for intra-vn inter-node
27+
Steps:
28+
1. Create 2 VNs and launch 3 VMs.2 client VMs in VN1 on same node
29+
and server VM in VN2 on different node.
30+
Client 1 in subnet 1, Client 2 in the next subnet.
31+
Policy p1 configured to allow udp traffic between VN1 and VN2.
32+
2. On server VM, config fat flow aggr prefix dest len 29 for UDP port 55.
33+
3. From both the client VMs, send ICMP traffic to the server VM twice with diff. src ports
34+
Pass criteria:
35+
1. On the remote CN, expect 2 pairs ( 1 for client 1, 1 for client 2)
36+
of fat flows with prefix aggregated for the src IPs
37+
(VM to fabric, Prefix Aggr Dest: Aggregation happens for SRC IPs)
38+
2. On client VM compute nodes, expect 4 pairs of flows and on server compute,
39+
expect 2 pairs of flows
40+
3. On server compute node, flow's source port should be 0 for fat flows
41+
42+
Maintainer: [email protected]
43+
44+
"""
45+
prefix_length = 29
46+
ipv6 = False
47+
only_v6 = False
48+
if self.inputs.get_af() == 'dual':
49+
ipv6 = True
50+
only_v6 = True
51+
prefix_length6 = 125
52+
inter_node = True
53+
inter_vn = True
54+
proto = 'udp'
55+
port = 55
56+
policy_deny = False
57+
vn_policy = True
58+
self.fat_flow_with_prefix_aggr(prefix_length=prefix_length,
59+
inter_node=inter_node,inter_vn=inter_vn, proto=proto,
60+
port=port, vn_policy=vn_policy, policy_deny=policy_deny,
61+
dual=ipv6, prefix_length6=prefix_length6, only_v6=only_v6)
62+
return True
63+
64+
class FatFlowAggrIpv6Serial(FatFlowAggrSerial):
65+
@classmethod
66+
def setUpClass(cls):
67+
super(FatFlowAggrSerial, cls).setUpClass()
68+
cls.inputs.set_af(AF_TEST)
69+
70+
@test.attr(type=['sanity','dev_reg'])
71+
@preposttest_wrapper
72+
def test_fat_flow_aggr_dest_udp_inter_vn_inter_node(self):
73+
"""
74+
Description: Verify fat flow prefix aggr dest (IPv6) for intra-vn inter-node
75+
Steps:
76+
1. Create 2 VNs with IPv6 subnets and launch 3 VMs.2 client VMs in VN1 on same node
77+
and server VM in VN2 on different node.
78+
Client 1 in subnet 1, Client 2 in the next subnet.
79+
Policy p1 configured to allow udp traffic between VN1 and VN2.
80+
2. On server VM, config fat flow aggr prefix dest IPv6 len 125 for UDP port 55.
81+
3. From both the client VMs, send ICMP6 traffic to the server VM twice with diff. src ports
82+
Pass criteria:
83+
1. On the remote CN, expect 2 pairs ( 1 for client 1, 1 for client 2)
84+
of IPv6 fat flows with prefix aggregated for the src IPs
85+
(VM to fabric, Prefix Aggr Dest: Aggregation happens for SRC IPs)
86+
2. On client VM compute nodes, expect 4 pairs of IPv6 flows and on server compute,
87+
expect 2 pairs of IPv6 flows
88+
3. On server compute node, flow's source port should be 0 for fat flows
89+
90+
Maintainer: [email protected]
91+
92+
"""
93+
self.inputs.set_af('dual')
94+
super(FatFlowAggrIpv6Serial, self).test_fat_flow_aggr_dest_udp_inter_vn_inter_node()
95+

serial_scripts/vrouter/test_fat_flow_serial.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,45 @@ def setUpClass(cls):
1919
def tearDownClass(cls):
2020
super(FatFlowSerial, cls).tearDownClass()
2121

22+
@preposttest_wrapper
23+
def test_fat_flow_intra_vn_inter_node(self):
24+
"""
25+
Description: Verify Fat flow for intra-VN inter-Node traffic
26+
Steps:
27+
1. create 1 VN and launch 3 VMs in it.client VMs on same node and server VM on different node.
28+
2. on server VM, config Fat flow for udp port 53.
29+
3. from both client VM, send UDP traffic to server on port 53 twice with diff. src ports
30+
Pass criteria:
31+
1. on client VMs compute, 4 set of flows and on server compute, 2 set of flows should be created
32+
2. on server compute, flow's source port should be 0 for Fat flow
33+
"""
34+
vn_fixtures = self.create_vns(count=1)
35+
self.verify_vns(vn_fixtures)
36+
vn1_fixture = vn_fixtures[0]
37+
38+
compute_hosts = self.orch.get_hosts()
39+
if len(compute_hosts) < 2:
40+
raise self.skipTest("Skipping test case,"
41+
"this test needs atleast 2 compute nodes")
42+
client_fixtures = self.create_vms(vn_fixture= vn1_fixture,count=2,
43+
node_name=compute_hosts[0])
44+
server_fixtures = self.create_vms(vn_fixture= vn1_fixture,count=1,
45+
node_name=compute_hosts[1])
46+
self.verify_vms(client_fixtures)
47+
self.verify_vms(server_fixtures)
48+
49+
#Configure Fat flow on server VM
50+
proto = 'udp'
51+
port = 53
52+
server_vmi_id = list(server_fixtures[0].get_vmi_ids().values())
53+
fat_flow_config = {'proto':proto,'port':port}
54+
self.add_fat_flow_to_vmis(server_vmi_id, fat_flow_config)
55+
56+
afs = ['v4', 'v6'] if 'dual' in self.inputs.get_af() else [self.inputs.get_af()]
57+
for af in afs:
58+
self.verify_fat_flow_with_traffic(client_fixtures,server_fixtures[0],
59+
proto, port, af=af)
60+
2261
@preposttest_wrapper
2362
def test_fat_flow_inter_vn_inter_node(self):
2463
"""
@@ -559,3 +598,8 @@ def is_test_applicable(self):
559598
return(False, 'Skipping IPv6 Test on vcenter setup')
560599
return (True, None)
561600

601+
@test.attr(type=['cb_sanity', 'sanity'])
602+
def test_fat_flow_intra_vn_inter_node(self):
603+
self.inputs.set_af('dual')
604+
super(FatFlowSerialIpv6, self).test_fat_flow_intra_vn_inter_node()
605+

0 commit comments

Comments
 (0)