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

[port_rates][rif_rates] Fix port_rates.lua #1520

Merged
merged 2 commits into from
Dec 3, 2020

Conversation

vboykox
Copy link
Member

@vboykox vboykox commented Nov 26, 2020

Signed-off-by: Volodymyr Boyko volodymyrx.boiko@intel.com

What I did
Set rate collect logic init state per port
Why I did it
Observing following syslog:
Nov 26 19:34:28.821608 sonic ERR syncd[26]: :- guard: RedisReply catches system_error: command: *39#015#012$7#015#012EVALSHA#015#012$40#015#0121140a72bbf8e5306e589cb798796067294922901#015#012$2#015#01232#015#012$19#015#012oid:0x600000000034f#015#012$19#015#012oid:0x6000000000350#015#012$19#015#012oid:0x6000000000351#015#012$19#015#012oid:0x6000000000352#015#012$19#015#012oid:0x6000000000353#015#012$19#015#012oid:0x6000000000354#015#012$19#015#012oid:0x6000000000355#015#012$19#015#012oid:0x6000000000356#015#012$19#015#012oid:0x6000000000357#015#012$19#015#012oid:0x6000000000358#015#012$19#015#012oid:0x6000000000359#015#012$19#015#012oid:0x600000000035a#015#012$19#015#012oid:0x600000000035b#015#012$19#015#012oid:0x600000000035c#015#012$19#015#012oid:0x600000000035d#015#012$19#015#012oid:0x600000000035e#015#012$19#015#012oid:0x600000000035f#015#012$19#015#012oid:0x6000000000360#015#012$19#015#012oid:0x6000000000361#015#012$19#015#012oid:0x6000000000362#015#012$19#015#012oid:0x6000000000363#015#012$19#015#012oid:0x6000000000364#015#012$19#015#012oid:0x6000000000365#015#012$19#015#012oid:0x6000000000366#015#012$19#015#012oid:0x6000000000367#015#012$19#015#012oid:0x6000000000368#015#012$19#015#012oid:0x6000000000369#015#012$19#015#012oid:0x600000000036a#015#012$19#015#012oid:0x600000000036b#015#012$19#015#012oid:0x600000000036c#015#012$19#015#012oid:0x600000000036d#015#012$19#015#012oid:0x600000000036e#015#012$1#015#0122#015#012$8#015#012COUNTERS#015#012$7#015#0121000000#015#012$2#015#012''#015#012, reason: ERR Error running script (call to f_1140a72bbf8e5306e589cb798796067294922901): @user_script:47: user_script:47: attempt to perform arithmetic on local 'in_octets_last' (a boolean value) : Input/output error Nov 26 19:34:28.821608 sonic ERR syncd[26]: :- runRedisScript: Caught exception while running Redis lua script: ERR Error running script (call to f_1140a72bbf8e5306e589cb798796067294922901): @user_script:47: user_script:47: attempt to perform arithmetic on local 'in_octets_last' (a boolean value) : Input/output error
loop sets DONE state on processing the first port, leaving the rest of the ports' states uninitialized.

How I verified it
Checked redis-cli -n 2 hgetall RATES:oid: to ensure _last fields are set.
Details if related

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
@vboykox
Copy link
Member Author

vboykox commented Nov 26, 2020

@vboykox
Copy link
Member Author

vboykox commented Nov 27, 2020

retest vs please

@vboykox
Copy link
Member Author

vboykox commented Dec 2, 2020

@mykolaf @wangxin @lguohan

@daall
Copy link
Contributor

daall commented Dec 2, 2020

@lguohan this fix is needed for sonic-net/sonic-mgmt#2434

@lguohan lguohan merged commit c0f951c into sonic-net:master Dec 3, 2020
@lguohan
Copy link
Contributor

lguohan commented Dec 3, 2020

@vboykox, do we need to backport this to previous 201911 branch?

@vboykox
Copy link
Member Author

vboykox commented Dec 3, 2020

@lguohan, no

daall pushed a commit to daall/sonic-swss that referenced this pull request Dec 7, 2020
Previously, loop sets DONE state on processing the first port, leaving the rest of the ports' states uninitialized. 
Now, the fix set rate collect logic init state per port.

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Fix for hanging:
Enforce max len on string to be printed to stdout.
With huge mismatch, the message to print can be too long to hang python print statement.

Lower logging level:
The log for "details of route mismatch" is lowered to WARNING. The caller of the route_check may log error, as it sees it fit. The failure of route_check is indicated to caller via exit code.

How to verify it
Simulate error (route-mismatch), and verify
a) message len does not exceed set MAX
b) log level is WARNING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants