Skip to content
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

sonic-mgmt: Fix namespace issues for qos tests on T2 single ASIC #15708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patrickmacarthur
Copy link
Contributor

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?

We are seeing UnboundLocalError when running sonic-mgmt tests against a single-ASIC linecard:

UnboundLocalError: local variable 'dst_sys_port_id' referenced before assignment

Upon further investigation, this was determined to be happening because a previous attempt to fix this issue (PR #13700) completely omitted the ASIC prefix, but the entries in SYSTEM_PORT in config_db do have an Asic0 prefix even on a single ASIC DUT.

How did you do it?

Resolve this by specifically adding the Asic0 prefix in the case of a single-ASIC T2 DUT, instead of leaving the prefix out.

How did you verify/test it?

Tested by manually running qos tests on a T2 single ASIC DUT with these changes.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

We are seeing UnboundLocalError when running sonic-mgmt tests against
a single-ASIC linecard:

```
UnboundLocalError: local variable 'dst_sys_port_id' referenced before assignment
```

Upon further investigation, this was determined to be happening
because a previous attempt to fix this issue (PR sonic-net#13700) completely
omitted the ASIC prefix, but the entries in SYSTEM_PORT in config_db
do have an Asic0 prefix even on a single ASIC DUT.

Resolve this by specifically adding the Asic0 prefix in the case of a
single-ASIC T2 DUT, instead of leaving the prefix out.

Tested by manually running qos tests on a T2 single ASIC DUT with
these changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant