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

[mirroring] Queue value 0 is missing after validation in config mirror-session command #10795

Closed
arfeigin opened this issue May 10, 2022 · 4 comments · Fixed by sonic-net/sonic-utilities#2162
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@arfeigin
Copy link
Contributor

Description

When adding new mirror session with queue value = 0, it is not entered to the config DB and won't show when printing the current mirror sessions.
The issue is found on master/202111/202012 branches, however it works correctly on 202106 branch.
I explored it a bit and the issue was introduced after PR #1825.

Steps to reproduce the issue:

Run the following commands:

  1. sudo config mirror_session erspan add ERSPAN2 100.0.0.1 100.0.0.2 0 11 35145 0 Ethernet0 rx
  2. show mirror_session

Describe the results you received:

Queue value is empty:
image

Describe the results you expected:

(202106 SONiC build)
image

Output of show version:

image

Additional information you deem important (e.g. issue happens only occasionally):

image
It looks like the issue can be solved by either omitting ‘type=QUEUE_RANGE’ but this way the queue value won't be validated, or keep the validation in place and change the condition check to: ‘if queue >= 0:’.
Both options solve the issue.

@bingwang-ms
Copy link
Contributor

Will take a look. Thanks for the great finding.

@bingwang-ms
Copy link
Contributor

PR raised to fix the issue sonic-net/sonic-utilities#2162. Please help take a look. Thanks

@arfeigin
Copy link
Contributor Author

Will take a look. Thanks for the great finding.

You welcome!

@arfeigin
Copy link
Contributor Author

PR raised to fix the issue Azure/sonic-utilities#2162. Please help take a look. Thanks

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants