[Auto-Techsupport] Fix the coredump_gen_handler Exception when the History table is empty#2265
Merged
liat-grozovik merged 2 commits intosonic-net:masterfrom Jul 13, 2022
Merged
Conversation
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
dgsudharsan
approved these changes
Jul 11, 2022
qiluo-msft
approved these changes
Jul 12, 2022
stepanblyschak
pushed a commit
to stepanblyschak/sonic-utilities
that referenced
this pull request
Oct 10, 2022
…n the History table is empty (sonic-net#2265) coredump_gen_handler script is throwing exception currently when the history table is empty. Fix this issue and add a UT Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com> Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
liat-grozovik
pushed a commit
that referenced
this pull request
Oct 11, 2022
…n the History table is empty (#2265) (#2433) What I did BACKPORT OF: #2265 coredump_gen_handler script is throwing exception currently when the history table is empty. root@r-lionfish-14:/home/admin# cat /tmp/coredump_gen_handler.log Traceback (most recent call last): File "/usr/local/bin/coredump_gen_handler.py", line 82, in <module> main() File "/usr/local/bin/coredump_gen_handler.py", line 77, in main cls.handle_core_dump_creation_event() File "/usr/local/bin/coredump_gen_handler.py", line 60, in handle_core_dump_creation_event invoke_ts_command_rate_limited(self.db, EVENT_TYPE_CORE, {CORE_DUMP: self.core_name}, self.container) File "/usr/local/lib/python3.9/dist-packages/utilities_common/auto_techsupport_helper.py", line 331, in invoke_ts_command_rate_limited cooloff_passed = verify_rate_limit_intervals(db, global_cooloff, container_cooloff, container) File "/usr/local/lib/python3.9/dist-packages/utilities_common/auto_techsupport_helper.py", line 291, in verify_rate_limit_intervals if container_cooloff and container in ts_map: TypeError: argument of type 'NoneType' is not iterable Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
coredump_gen_handler script is throwing exception currently when the history table is empty.
Fix this issue and add a UT
How I did it
How to verify it
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)