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

Handle NotImplementedError in determine-reboot-cause that will be thrown on VS Chassis platform #211

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BYGX-wcr
Copy link

@BYGX-wcr BYGX-wcr commented Feb 5, 2025

On VS Chassis platform, the sonic_platform package is not implemented since there is no hardware associated with it. So the chassis.get_reboot_cause API will throw NotImplementedError. I added the code change to handle this exception and return the reboot cause as "N/A" in this case.

…lementedError that will be thrown on VS Chassis platform
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BYGX-wcr BYGX-wcr requested a review from abdosi February 5, 2025 22:10
@BYGX-wcr BYGX-wcr changed the title Handle NotImplementedError that will be thrown on VS Chassis platform Handle NotImplementedError in determine-reboot-cause that will be thrown on VS Chassis platform Feb 5, 2025
@mssonicbld
Copy link

/azp run

@@ -142,7 +145,7 @@ def get_reboot_cause_dict(previous_reboot_cause, comment, gen_time):
If user issused a command to reboot device, then user, command and time will be
stored into a dictionary.

If device was rebooted due to the kernel panic, then the string `Kernel Panic`
If device was rebooted due to the kernel panic, then the string `Kernel Panic`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we are seeing whitespace diff

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My editor will automatically trim trailing white spaces.

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