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

Add reboot-cause information to telemetry #669

Merged
merged 20 commits into from
Oct 22, 2020
Merged

Add reboot-cause information to telemetry #669

merged 20 commits into from
Oct 22, 2020

Conversation

sujinmkang
Copy link
Collaborator

To support the reboot-cause information sending via telemetry agent, this HLD proposes the state-DB schema and how to process the reboot-cause information during the reboot-cause-process.

doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
@sujinmkang
Copy link
Collaborator Author

@jleveque Can you please review this HLD again?

doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
doc/system-telemetry/reboot-cause.md Outdated Show resolved Hide resolved
@sujinmkang sujinmkang merged commit e6eb438 into sonic-net:master Oct 22, 2020
wangxin pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Sep 17, 2021
…est_reboot.py (#4270)

This is to add test case in sonic-mgmt/tests/platform_tests/test_reboot.py to cover new feature reboot-cause history introduced in sonic-net/SONiC#669. Example:

show reboot-cause history
Name                 Cause          Time                             User    Comment
-------------------  -------------  -------------------------------  ------  ---------
2021_09_09_14_15_13  Power Loss ()  N/A                              N/A     N/A
2021_09_09_14_06_17  reboot         Thu 09 Sep 2021 02:05:17 PM UTC  admin   N/A
2021_09_09_13_59_11  Watchdog ()    N/A                              N/A     N/A
2021_09_09_13_52_13  Power Loss ()  N/A                              N/A     N/A
2021_09_09_13_45_18  warm-reboot    Thu 09 Sep 2021 01:44:14 PM UTC  admin   N/A
2021_09_09_13_37_58  fast-reboot    Thu 09 Sep 2021 01:37:09 PM UTC  admin   N/A
2021_09_09_13_30_52  soft-reboot    Thu 09 Sep 2021 01:30:24 PM UTC  admin   N/A
2021_09_09_13_24_17  reboot         Thu 09 Sep 2021 01:23:17 PM UTC  admin   N/A

What is the motivation for this PR?
In order to verify reboot-cause history function, add new checker for "show reboot-cause history" into reboot tests

How did you do it?
Add one new function of check_reboot_cause_history in sonic-mgmt/tests/platform_tests/test_reboot.py.
In test_reboot.py, there are 8 different reboot tests. In order to save test execution time, we leverage the reboot-cause history generated by them to test it.
1. Verify the reboot-cause history title
2. Verify reboot-cause output are sorted in reverse chronological order
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…est_reboot.py (sonic-net#4270)

This is to add test case in sonic-mgmt/tests/platform_tests/test_reboot.py to cover new feature reboot-cause history introduced in sonic-net/SONiC#669. Example:

show reboot-cause history
Name                 Cause          Time                             User    Comment
-------------------  -------------  -------------------------------  ------  ---------
2021_09_09_14_15_13  Power Loss ()  N/A                              N/A     N/A
2021_09_09_14_06_17  reboot         Thu 09 Sep 2021 02:05:17 PM UTC  admin   N/A
2021_09_09_13_59_11  Watchdog ()    N/A                              N/A     N/A
2021_09_09_13_52_13  Power Loss ()  N/A                              N/A     N/A
2021_09_09_13_45_18  warm-reboot    Thu 09 Sep 2021 01:44:14 PM UTC  admin   N/A
2021_09_09_13_37_58  fast-reboot    Thu 09 Sep 2021 01:37:09 PM UTC  admin   N/A
2021_09_09_13_30_52  soft-reboot    Thu 09 Sep 2021 01:30:24 PM UTC  admin   N/A
2021_09_09_13_24_17  reboot         Thu 09 Sep 2021 01:23:17 PM UTC  admin   N/A

What is the motivation for this PR?
In order to verify reboot-cause history function, add new checker for "show reboot-cause history" into reboot tests

How did you do it?
Add one new function of check_reboot_cause_history in sonic-mgmt/tests/platform_tests/test_reboot.py.
In test_reboot.py, there are 8 different reboot tests. In order to save test execution time, we leverage the reboot-cause history generated by them to test it.
1. Verify the reboot-cause history title
2. Verify reboot-cause output are sorted in reverse chronological order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants