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

Merged

Conversation

BYGX-wcr
Copy link
Contributor

@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

@FengPan-Frank
Copy link
Contributor

pls resolve conflict

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BYGX-wcr
Copy link
Contributor Author

pls resolve conflict
I have resolved.

@BYGX-wcr
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link

/AzurePipelines run

@BYGX-wcr BYGX-wcr closed this Feb 10, 2025
@BYGX-wcr BYGX-wcr reopened this Feb 10, 2025
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@deepak-singhal0408
Copy link
Contributor

deepak-singhal0408 commented Feb 10, 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

@BYGX-wcr the sonic_platform package is installed for vs_chassis. the get_reboot_cause api is not implemented there. Did you get chance to check how its working on pizza box kvm image?

Copy link
Contributor

@FengPan-Frank FengPan-Frank left a comment

Choose a reason for hiding this comment

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

LGTM

@BYGX-wcr
Copy link
Contributor Author

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

@BYGX-wcr the sonic_platform package is installed for vs_chassis. the get_reboot_cause api is not implemented there. Did you get chance to check how its working on pizza box kvm image?

On T0/T1 KVM devices, the sonic_platform package is not installed at all. So, it won't cause an uncaptured runtime exception.

@BYGX-wcr BYGX-wcr merged commit 741a9df into sonic-net:master Feb 11, 2025
5 checks passed
@BYGX-wcr BYGX-wcr deleted the handle_chassis_module_not_implemented_error branch February 11, 2025 05:10
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.

5 participants