-
Notifications
You must be signed in to change notification settings - Fork 771
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
Fix acl/test_stress_acl.py invalid interface name #15796
Conversation
creation In `acl/test_stress_acl.py`, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively. Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check. Fix by checking if a PortChannel exists. If it does - use it. If it does not - fallback on the secondary method to retrieve a normal interface name if its a not a dualtor topo (due to sonic-net#6960).
hi @bingwang-ms could you help to take a look? |
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
@justin-wong-ce Can you help me understand why there is no portchannel for test on dualtor platform? |
I decided to handle dualtor differently because of this previous pull request: #6960:
I am not too familiar with PortChannels on dualtor but I think sometimes it is not available based on the PR adding dualtor support to the test. |
Thanks for the reply. Portchannels should always be available on dualtor platform. |
As discussed in PR conversation, there is no need for dualtor to have any special checks. Generalizing the checks for all topos.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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
Description of PR Fix acl/test_stress_acl.py using bad interface name for ACL table creation Summary: Fixes # (issue) In acl/test_stress_acl.py, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively. Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check - in some topos the test will fail with: Error: Failed to parse ACL table config: exception=Cannot bind ACL to specified port Ethernet136 Reproducible by manually running the following on the DUT: config acl add table DATAACL L3 -s ingress -p Ethernet0 ^FAILS config acl add table DATAACL L3 -s ingress -p PortChannel101 ^WORKS
Description of PR Fix acl/test_stress_acl.py using bad interface name for ACL table creation Summary: Fixes # (issue) In acl/test_stress_acl.py, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively. Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check - in some topos the test will fail with: Error: Failed to parse ACL table config: exception=Cannot bind ACL to specified port Ethernet136 Reproducible by manually running the following on the DUT: config acl add table DATAACL L3 -s ingress -p Ethernet0 ^FAILS config acl add table DATAACL L3 -s ingress -p PortChannel101 ^WORKS
Cherry-pick PR to 202405: #16155 |
Description of PR Fix acl/test_stress_acl.py using bad interface name for ACL table creation Summary: Fixes # (issue) In acl/test_stress_acl.py, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively. Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check - in some topos the test will fail with: Error: Failed to parse ACL table config: exception=Cannot bind ACL to specified port Ethernet136 Reproducible by manually running the following on the DUT: config acl add table DATAACL L3 -s ingress -p Ethernet0 ^FAILS config acl add table DATAACL L3 -s ingress -p PortChannel101 ^WORKS
Cherry-pick PR to 202411: #16156 |
Description of PR Fix acl/test_stress_acl.py using bad interface name for ACL table creation Summary: Fixes # (issue) In acl/test_stress_acl.py, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively. Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check - in some topos the test will fail with: Error: Failed to parse ACL table config: exception=Cannot bind ACL to specified port Ethernet136 Reproducible by manually running the following on the DUT: config acl add table DATAACL L3 -s ingress -p Ethernet0 ^FAILS config acl add table DATAACL L3 -s ingress -p PortChannel101 ^WORKS
Description of PR Fix acl/test_stress_acl.py using bad interface name for ACL table creation Summary: Fixes # (issue) In acl/test_stress_acl.py, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively. Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check - in some topos the test will fail with: Error: Failed to parse ACL table config: exception=Cannot bind ACL to specified port Ethernet136 Reproducible by manually running the following on the DUT: config acl add table DATAACL L3 -s ingress -p Ethernet0 ^FAILS config acl add table DATAACL L3 -s ingress -p PortChannel101 ^WORKS
@r12f This PR also needed for the 202412 branch, can you help to merge it also to 202412 branch? |
already included in 202411, removing 202412 tag. |
Description of PR
Fix acl/test_stress_acl.py using bad interface name for ACL table creation
Summary:
Fixes # (issue)
In
acl/test_stress_acl.py
, it attempts to retrieve an interface that can be used to create a ACL table. DUTs with and without PortChannels require different methods respectively.Currently, it checks by filtering with topo. However, some topology flags can have configurations that have or not have PortChannels, making topos no longer a sufficient check - in some topos the test will fail with:
Reproducible by manually running the following on the DUT:
Type of change
Back port request
Approach
What is the motivation for this PR?
How did you do it?
Fix by checking if a PortChannel exists. If it does - use it. If it does not - fallback on the secondary method to retrieve a normal interface name if its a not a dualtor topo (due to
#6960).
How did you verify/test it?
Test no longer fails creating an ACL table on a t1 topo with PortChannels.
Tested with Arista HwSkus on t0, t1, t2, and mx topologies.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation