-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new test for vlan subnet decap #14720
Conversation
tests/decap/test_subnet_decap.py
Outdated
"status" "enable" "src_ip" "{}" "src_ip_v6" "{}"' | ||
.format(SUBNET_DECAP_SRC_IP_V4, SUBNET_DECAP_SRC_IP_V6)) | ||
rand_selected_dut.shell('sudo config save -y') | ||
rand_selected_dut.shell('sudo config reload -y') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to use config_reload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
tests/decap/test_subnet_decap.py
Outdated
yield | ||
rand_selected_dut.shell('sonic-db-cli CONFIG_DB del "SUBNET_DECAP|subnet_type"') | ||
rand_selected_dut.shell('sudo config save -y') | ||
rand_selected_dut.shell('sudo config reload -y') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, use
sonic-mgmt/tests/common/config_reload.py
Line 115 in e4d40d2
def config_reload(sonic_host, config_source='config_db', wait=120, start_bgp=True, start_dynamic_buffer=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
tests/decap/test_subnet_decap.py
Outdated
exp_pkt = build_expected_vlan_subnet_packet(encapsulated_packet, ip_version, stage, decrease_ttl=True) | ||
|
||
ptf_target_port = random.choice(downstream_port_ids) | ||
setup_arp_responder(ptfhost, ip_version, stage, ptf_target_port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to put the arp responder setup/teardown into a fixture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
tests/decap/test_subnet_decap.py
Outdated
|
||
SUBNET_DECAP_SRC_IP_V4 = "20.20.20.0/24" | ||
SUBNET_DECAP_SRC_IP_V6 = "fc01::/120" | ||
OUTER_DST_IP_V4 = "192.168.0.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This IP is already occupied by the mux server on dualtor testbed, better to use a larger one, like 192.168.0.200
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
tests/decap/test_subnet_decap.py
Outdated
logger = logging.getLogger(__name__) | ||
|
||
pytestmark = [ | ||
pytest.mark.topology('t0', 't1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this testcase is supposed to run on t0
and dualtor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add dualtor
and do not remove t1
, because once we add Verify IPinIP packet targeting at vnet route is decapsulated
to this script, it should be run on t1
, I have used conditional mark to skip vlan subnet decap test in t1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What is the motivation for this PR? In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected. How did you do it? Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only) Ref test gap issue: sonic-net#13120 Ref test plan: sonic-net#12990 How did you verify/test it? Test on broadcom td3 asic and KVM
What is the motivation for this PR? In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected. How did you do it? Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only) Ref test gap issue: sonic-net#13120 Ref test plan: sonic-net#12990 How did you verify/test it? Test on broadcom td3 asic and KVM
What is the motivation for this PR? In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected. How did you do it? Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only) Ref test gap issue: sonic-net#13120 Ref test plan: sonic-net#12990 How did you verify/test it? Test on broadcom td3 asic and KVM
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
In Azure network, Netscan uses IP-decap to check for route blackholes, but servers do not support decapsulation, making it impossible to perform server-to-server checks. To address this, we developed the subnet decap feature to detect if the link between the server and T0 is functioning properly. Additionally, new test cases are required to ensure the functionality of subnet decap is working as expected.
How did you do it?
Add new test to verify IPinIP packet targeting at VLAN subnet is decapsulated (T0 only)
Ref test gap issue: #13120
Ref test plan: #12990
How did you verify/test it?
Test on broadcom td3 asic and KVM
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation