[Auto-Techsupport] Issues related to Multiple Cores crashing handled#1948
Merged
qiluo-msft merged 6 commits intosonic-net:masterfrom Dec 6, 2021
Merged
[Auto-Techsupport] Issues related to Multiple Cores crashing handled#1948qiluo-msft merged 6 commits intosonic-net:masterfrom
qiluo-msft merged 6 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Contributor
Author
|
@ganglyu @qiluo-msft Please help review |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ganglyu
reviewed
Nov 25, 2021
scripts/coredump_gen_handler.py
Outdated
| matches = re.findall(TS_PTRN, ts_stdout) | ||
| if matches: | ||
| return matches[-1] | ||
| else: |
Contributor
There was a problem hiding this comment.
else is not necessary here.
tests/coredump_gen_handler_test.py
Outdated
| if "show techsupport --since '2 days ago'" in cmd_str: | ||
| patcher.fs.create_file("/var/dump/sonic_dump_random3.tar.gz") | ||
| return 0, "", "" | ||
| print(cmd_str) |
5 tasks
Closed
5 tasks
judyjoseph
pushed a commit
that referenced
this pull request
Jan 9, 2022
…1948) #### What I did **Issues seen when multiple cores are crashed in very quick succession:** 1) The **rate_limit_interval** is not honored. Because, i previously was finding out the last created tech-support using the glob pattern `sonic_dump_*tar*`, which will not include the dumps which are being currently run. These existing dump will not have .tar.gz extension. Thus, modified the `get_ts_dumps` to search based on the TS_ROOT i.e `sonic_dump_*` 2) **show auto-tech support history** is not showing all the created dumps. I've previously used to take the diff of tech support dumps before and after running the invocation and used to assign the diff as the corresponding techsupport for this core. This approach is prone to race condition as we can have multiple dumps in the diff found in the interval. Avoided this by parsing the stdout returned by `show techsupport` invocation #### How to verify it 1) Unit Tests 2) Generate core-dumps in very quick succession. Use the default rate limit interval. Should only see one entry in tech-support history 3) Set global rate limit interval to 0. Generate cores in quick succession. Should see a few entries in the history.
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.
Signed-off-by: Vivek Reddy Karri vkarri@nvidia.com
What I did
Issues seen when multiple cores are crashed in very quick succession:
sonic_dump_*tar*, which will not include the dumps which are being currently run. These existing dump will not have .tar.gz extension. Thus, modified theget_ts_dumpsto search based on the TS_ROOT i.esonic_dump_*Avoided this by parsing the stdout returned by
show techsupportinvocationHow 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)