-
Notifications
You must be signed in to change notification settings - Fork 711
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
Add platform test for kdump #10047
Add platform test for kdump #10047
Conversation
Signed-off-by: Aman Singhal <amans@cisco.com>
@prgeor Can you pls help check this Elastictest failure, doesn't seem related to my change, thanks. |
@prgeor Can you pls help review and check this Elastictest failure, doesn't seem related to my change, thanks. |
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Good question. Thanks for looking up the history. I believe the old PR #3562 has unresolve review comments. That was the reason for leaving it open. |
thanks @yxieca for the reply. So what is your guidance on this PR-10047? it has a subset of the TCs of #3562 which are currently applicable for our platform. So do we wait for 3562 to be merged or can we go ahead and push this PR in. Please let us know, so that we can proceed accordingly. Thanks |
We can work on this PR and get it merged. At this point. this PR contains blocking comments. Please resolve. |
thanks @yxieca , Aman will work on addressing the comments and proceed. |
Thanks for confirming @yxieca and @bpar9, I have resolved the comments and update the PR, pls review and approve/merge. |
@yxieca All checks have passed, except Semgrep is still waiting for status to be reported, can you pls check this. Thanks! |
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
@prgeor can you review this test? |
@prgeor Can you pls review and approve/merge, if no further suggestions, thanks! |
""" | ||
This test case is used to verify that DUT will load kdump crashkernel on kernel panic. | ||
""" | ||
def wait_lc_healthy_if_sup(self, duthost, duthosts, localhost, conn_graph_facts, xcvr_skip_list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amnsinghal is this test supposed to run only on supervisor? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the test runs on both LCs and RPs. For RPs, there is an additional check to ensure that LCs come up healthy after RP goes down and come back up. (In SONiC distributed chassis, LCs go down as well if RP goes down - Ref: sonic-net/SONiC#945 (comment))
if "Enabled" not in out["stdout"]: | ||
pytest.skip('DUT {}: Skip test since kdump is not enabled'.format(hostname)) | ||
|
||
reboot(duthost, localhost, reboot_type=REBOOT_TYPE_KERNEL_PANIC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amnsinghal why not trigger panic via echo c > /proc/sysrq-trigger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is indeed what is being done with "REBOOT_TYPE_KERNEL_PANIC". See changes in reboot.py above.
@prgeor if no further comments, can you please approve/merge, thanks! |
@wangxin please help with cherry-pick into 202205/202305. |
What is the motivation for this PR? Add automation test for kdump functionality. How did you do it? Induce kernel panic thru sysrq-trigger. How did you verify/test it? For platform with kdump enabled, trigger kernel panic, and check for reboot-cause on subsequent bootup.
What is the motivation for this PR? Add automation test for kdump functionality. How did you do it? Induce kernel panic thru sysrq-trigger. How did you verify/test it? For platform with kdump enabled, trigger kernel panic, and check for reboot-cause on subsequent bootup.
Cherry-pick PR to 202205: #11485 |
Cherry-pick PR to 202305: #11486 |
What is the motivation for this PR? Add automation test for kdump functionality. How did you do it? Induce kernel panic thru sysrq-trigger. How did you verify/test it? For platform with kdump enabled, trigger kernel panic, and check for reboot-cause on subsequent bootup.
What is the motivation for this PR? Add automation test for kdump functionality. How did you do it? Induce kernel panic thru sysrq-trigger. How did you verify/test it? For platform with kdump enabled, trigger kernel panic, and check for reboot-cause on subsequent bootup.
Summary:
Add test_kdump.py to platform_tests.
Type of change
Back port request
Approach
What is the motivation for this PR?
Add automation test for kdump functionality.
How did you do it?
Induce kernel panic thru sysrq-trigger.
How did you verify/test it?
For platform with kdump enabled, trigger kernel panic, and check for reboot-cause on subsequent bootup.
Validated on Cisco-8000 platforms thru internal sonic-mgmt test.
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
Any platform with kdump enabled, else test will be skipped.