-
Notifications
You must be signed in to change notification settings - Fork 779
Fix issue that namespace is not correctly fetched in Multi ASIC environment for mirror capability checking #4159
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 issue that namespace is not correctly fetched in Multi ASIC environment for mirror capability checking #4159
Conversation
Signed-off-by: Stephen Sun <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
do you need a UT? |
|
The failing test now passes with this fix link https://elastictest.org/scheduler/publictestplan/694290ffb443f607a1230cd5?searchTestCase=show&testcase=show_techsupport%2Ftest_techsupport.py&type=log |
|
@oleksandrivantsiv FYI. let me know if you have any comments. |
|
@stephenxs I'm little confused about this change. Per my understanding, the issue mentioned in sonic-net/sonic-mgmt#21690 is regarding erspan (mirror session), while the change in this PR is about port mirror capability check. Can you help me understand how is this related? |
Sure @bingwang-ms |
Thanks for the reply. If if's for ERSPAN session, why do we need to call |
@bingwang-ms This is because ERSPAN is implemented using SAI mirror object. |
|
To my knowledge, function |
What I did
Fix issue sonic-net/sonic-mgmt#21690
How I did it
The logic to check the mirror capability is:
SWITCH_CAPABILITYtable in STATE_DB during initializationOn the multi ASIC environment, the table is in ASIC's namespace. But the CLI command fetches the capability from the host. As a result it always treats mirror is unsupported and fails the test.
Fixed by checking the mirror capability from the namespaces based on source and destination ports.
How to verify it
Manual test.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)