Skip to content

Commit

Permalink
Moving Fat Flow sanity tests to Serial scripts as it fails when runni…
Browse files Browse the repository at this point in the history
…ng in parallel.

Closes: CEM-29034
Signed-off-by: Sendilraj Perumalswamy <[email protected]>
Change-Id: I16b11b7b0de1b47987656362f33834eb0371e554
  • Loading branch information
sendilp committed Nov 17, 2022
1 parent e54d757 commit f6da725
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 31 deletions.
5 changes: 0 additions & 5 deletions scripts/vrouter/test_fat_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,3 @@ def is_test_applicable(self):
@preposttest_wrapper
def test_fat_flow_lbaasv2(self):
raise self.skipTest("Skipping Test. LBaas is NOT supported for IPv6")

@test.attr(type=['cb_sanity', 'sanity'])
def test_fat_flow_intra_vn_inter_node(self):
self.inputs.set_af('dual')
super(FatFlowIpv6, self).test_fat_flow_intra_vn_inter_node()
26 changes: 0 additions & 26 deletions scripts/vrouter/test_fat_flow_aggr.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,32 +273,6 @@ def test_fat_flow_aggr_dest_icmp_intra_vn_inter_node(self):
self.inputs.set_af('dual')
super(FatFlowAggrIpv6, self).test_fat_flow_aggr_dest_icmp_intra_vn_inter_node()

@test.attr(type=['sanity','dev_reg'])
@preposttest_wrapper
def test_fat_flow_aggr_dest_udp_inter_vn_inter_node(self):
"""
Description: Verify fat flow prefix aggr dest (IPv6) for intra-vn inter-node
Steps:
1. Create 2 VNs with IPv6 subnets and launch 3 VMs.2 client VMs in VN1 on same node
and server VM in VN2 on different node.
Client 1 in subnet 1, Client 2 in the next subnet.
Policy p1 configured to allow udp traffic between VN1 and VN2.
2. On server VM, config fat flow aggr prefix dest IPv6 len 125 for UDP port 55.
3. From both the client VMs, send ICMP6 traffic to the server VM twice with diff. src ports
Pass criteria:
1. On the remote CN, expect 2 pairs ( 1 for client 1, 1 for client 2)
of IPv6 fat flows with prefix aggregated for the src IPs
(VM to fabric, Prefix Aggr Dest: Aggregation happens for SRC IPs)
2. On client VM compute nodes, expect 4 pairs of IPv6 flows and on server compute,
expect 2 pairs of IPv6 flows
3. On server compute node, flow's source port should be 0 for fat flows
Maintainer: [email protected]
"""
self.inputs.set_af('dual')
super(FatFlowAggrIpv6, self).test_fat_flow_aggr_dest_udp_inter_vn_inter_node()

@test.attr(type=['dev_reg'])
@preposttest_wrapper
def test_fat_flow_aggr_dest_ignore_src_udp_inter_vn_inter_node(self):
Expand Down
95 changes: 95 additions & 0 deletions serial_scripts/vrouter/test_fat_flow_aggr_serial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
from common.vrouter.base import BaseVrouterTest
from tcutils.wrappers import preposttest_wrapper
import test
from tcutils.util import get_random_name, is_v6
import random
from common.neutron.lbaasv2.base import BaseLBaaSTest
from common.servicechain.config import ConfigSvcChain
from common.servicechain.verify import VerifySvcChain

AF_TEST = 'v6'

class FatFlowAggrSerial(BaseVrouterTest, BaseLBaaSTest):

@classmethod
def setUpClass(cls):
super(FatFlowAggrSerial, cls).setUpClass()

@classmethod
def tearDownClass(cls):
super(FatFlowAggrSerial, cls).tearDownClass()

@test.attr(type=['dev_reg'])
@preposttest_wrapper
def test_fat_flow_aggr_dest_udp_inter_vn_inter_node(self):
""":
Description: Verify fat flow prefix aggr dest (IPv4) for intra-vn inter-node
Steps:
1. Create 2 VNs and launch 3 VMs.2 client VMs in VN1 on same node
and server VM in VN2 on different node.
Client 1 in subnet 1, Client 2 in the next subnet.
Policy p1 configured to allow udp traffic between VN1 and VN2.
2. On server VM, config fat flow aggr prefix dest len 29 for UDP port 55.
3. From both the client VMs, send ICMP traffic to the server VM twice with diff. src ports
Pass criteria:
1. On the remote CN, expect 2 pairs ( 1 for client 1, 1 for client 2)
of fat flows with prefix aggregated for the src IPs
(VM to fabric, Prefix Aggr Dest: Aggregation happens for SRC IPs)
2. On client VM compute nodes, expect 4 pairs of flows and on server compute,
expect 2 pairs of flows
3. On server compute node, flow's source port should be 0 for fat flows
Maintainer: [email protected]
"""
prefix_length = 29
ipv6 = False
only_v6 = False
if self.inputs.get_af() == 'dual':
ipv6 = True
only_v6 = True
prefix_length6 = 125
inter_node = True
inter_vn = True
proto = 'udp'
port = 55
policy_deny = False
vn_policy = True
self.fat_flow_with_prefix_aggr(prefix_length=prefix_length,
inter_node=inter_node,inter_vn=inter_vn, proto=proto,
port=port, vn_policy=vn_policy, policy_deny=policy_deny,
dual=ipv6, prefix_length6=prefix_length6, only_v6=only_v6)
return True

class FatFlowAggrIpv6Serial(FatFlowAggrSerial):
@classmethod
def setUpClass(cls):
super(FatFlowAggrSerial, cls).setUpClass()
cls.inputs.set_af(AF_TEST)

@test.attr(type=['sanity','dev_reg'])
@preposttest_wrapper
def test_fat_flow_aggr_dest_udp_inter_vn_inter_node(self):
"""
Description: Verify fat flow prefix aggr dest (IPv6) for intra-vn inter-node
Steps:
1. Create 2 VNs with IPv6 subnets and launch 3 VMs.2 client VMs in VN1 on same node
and server VM in VN2 on different node.
Client 1 in subnet 1, Client 2 in the next subnet.
Policy p1 configured to allow udp traffic between VN1 and VN2.
2. On server VM, config fat flow aggr prefix dest IPv6 len 125 for UDP port 55.
3. From both the client VMs, send ICMP6 traffic to the server VM twice with diff. src ports
Pass criteria:
1. On the remote CN, expect 2 pairs ( 1 for client 1, 1 for client 2)
of IPv6 fat flows with prefix aggregated for the src IPs
(VM to fabric, Prefix Aggr Dest: Aggregation happens for SRC IPs)
2. On client VM compute nodes, expect 4 pairs of IPv6 flows and on server compute,
expect 2 pairs of IPv6 flows
3. On server compute node, flow's source port should be 0 for fat flows
Maintainer: [email protected]
"""
self.inputs.set_af('dual')
super(FatFlowAggrIpv6Serial, self).test_fat_flow_aggr_dest_udp_inter_vn_inter_node()

44 changes: 44 additions & 0 deletions serial_scripts/vrouter/test_fat_flow_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,45 @@ def setUpClass(cls):
def tearDownClass(cls):
super(FatFlowSerial, cls).tearDownClass()

@preposttest_wrapper
def test_fat_flow_intra_vn_inter_node(self):
"""
Description: Verify Fat flow for intra-VN inter-Node traffic
Steps:
1. create 1 VN and launch 3 VMs in it.client VMs on same node and server VM on different node.
2. on server VM, config Fat flow for udp port 53.
3. from both client VM, send UDP traffic to server on port 53 twice with diff. src ports
Pass criteria:
1. on client VMs compute, 4 set of flows and on server compute, 2 set of flows should be created
2. on server compute, flow's source port should be 0 for Fat flow
"""
vn_fixtures = self.create_vns(count=1)
self.verify_vns(vn_fixtures)
vn1_fixture = vn_fixtures[0]

compute_hosts = self.orch.get_hosts()
if len(compute_hosts) < 2:
raise self.skipTest("Skipping test case,"
"this test needs atleast 2 compute nodes")
client_fixtures = self.create_vms(vn_fixture= vn1_fixture,count=2,
node_name=compute_hosts[0])
server_fixtures = self.create_vms(vn_fixture= vn1_fixture,count=1,
node_name=compute_hosts[1])
self.verify_vms(client_fixtures)
self.verify_vms(server_fixtures)

#Configure Fat flow on server VM
proto = 'udp'
port = 53
server_vmi_id = list(server_fixtures[0].get_vmi_ids().values())
fat_flow_config = {'proto':proto,'port':port}
self.add_fat_flow_to_vmis(server_vmi_id, fat_flow_config)

afs = ['v4', 'v6'] if 'dual' in self.inputs.get_af() else [self.inputs.get_af()]
for af in afs:
self.verify_fat_flow_with_traffic(client_fixtures,server_fixtures[0],
proto, port, af=af)

@preposttest_wrapper
def test_fat_flow_inter_vn_inter_node(self):
"""
Expand Down Expand Up @@ -559,3 +598,8 @@ def is_test_applicable(self):
return(False, 'Skipping IPv6 Test on vcenter setup')
return (True, None)

@test.attr(type=['cb_sanity', 'sanity'])
def test_fat_flow_intra_vn_inter_node(self):
self.inputs.set_af('dual')
super(FatFlowSerialIpv6, self).test_fat_flow_intra_vn_inter_node()

0 comments on commit f6da725

Please sign in to comment.