Skip to content

[action] [PR:15796] Fix acl/test_stress_acl.py invalid interface name#16155

Merged
mssonicbld merged 1 commit intosonic-net:202405from
mssonicbld:cherry/202405/15796
Dec 28, 2024
Merged

[action] [PR:15796] Fix acl/test_stress_acl.py invalid interface name#16155
mssonicbld merged 1 commit intosonic-net:202405from
mssonicbld:cherry/202405/15796

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

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

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

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

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
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #15796

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run Azure.sonic-mgmt

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 664951b into sonic-net:202405 Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants