Skip to content

Add port counter sanity check#2300

Merged
jimmyzhai merged 1 commit intosonic-net:masterfrom
jimmyzhai:ErrorPort
Jun 3, 2022
Merged

Add port counter sanity check#2300
jimmyzhai merged 1 commit intosonic-net:masterfrom
jimmyzhai:ErrorPort

Conversation

@jimmyzhai
Copy link
Copy Markdown
Contributor

@jimmyzhai jimmyzhai commented May 28, 2022

What I did
Fix issue sonic-net/sonic-buildimage#10850 partially by adding sanity check in port_rates.lua. If the must-have counters of one port are not able to get, skip its rate computation.

Why I did it
It avoids port_rates.lua execution exits abnormally.

How I verified it

Capture and return error message if the needed counters of the port do not exist.

root@DUT:/# redis-cli --eval ./port_rates.lua oid:0x1000000000012 , 2 COUNTERS 10

1) "0.18"

2) "0.82"

3) "10"

4) "COUNTERS_LAST"

5) "Not found some counters on oid:0x1000000000012"

root@DUT:/# redis-cli --eval ./port_rates.lua oid:0x1000000000010  , 2 COUNTERS 10

1) "0.18"

2) "0.82"

3) "10"

4) "DONE"

Details if related

@jimmyzhai jimmyzhai requested a review from prsunny as a code owner May 28, 2022 12:42
@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented May 28, 2022

can you add full description? how you did it? how is it verified?

@jimmyzhai
Copy link
Copy Markdown
Contributor Author

can you add full description? how you did it? how is it verified?

Added

@jimmyzhai jimmyzhai merged commit a0c3238 into sonic-net:master Jun 3, 2022
yxieca pushed a commit that referenced this pull request Jun 15, 2022
What I did
Fix issue sonic-net/sonic-buildimage#10850 partially by adding sanity check in port_rates.lua. If the must-have counters of one port are not able to get, skip its rate computation.

Why I did it
It avoids port_rates.lua execution exits abnormally.
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
What I did
Fix issue sonic-net/sonic-buildimage#10850 partially by adding sanity check in port_rates.lua. If the must-have counters of one port are not able to get, skip its rate computation.

Why I did it
It avoids port_rates.lua execution exits abnormally.
lukasstockner pushed a commit to genesiscloud/sonic-swss that referenced this pull request Mar 31, 2023
What I did
Fix issue sonic-net/sonic-buildimage#10850 partially by adding sanity check in port_rates.lua. If the must-have counters of one port are not able to get, skip its rate computation.

Why I did it
It avoids port_rates.lua execution exits abnormally.
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
What I did
Fix issue sonic-net/sonic-buildimage#10850 partially by adding sanity check in port_rates.lua. If the must-have counters of one port are not able to get, skip its rate computation.

Why I did it
It avoids port_rates.lua execution exits abnormally.
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.

3 participants