-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
gNOI Cold Reboot - Integrated Rebootbackend changes #20710
base: master
Are you sure you want to change the base?
Conversation
5ac7797
to
c4b69a6
Compare
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.
Generally OK. Just some nits.
void reboot_thread(void); | ||
void do_reboot(void); | ||
Progress send_dbus_reboot_request(); | ||
void do_cold_reboot(swss::Select &s); | ||
|
||
// Inner loop select handler to wait for platform reboot. | ||
// wait for timeout | ||
// wait for a stop request (sigterm) | ||
// Returns: | ||
// EXIT_EARLY: an issue occurred that stops WARM | ||
// PROCEED: if reboot timeout expired | ||
Progress platform_reboot_select(swss::Select &s, | ||
swss::SelectableTimer &l_timer); | ||
|
||
// Wait for platform to reboot while waiting for possible stop | ||
// Returns: | ||
// EXIT_EARLY: an issue occurred that stops WARM | ||
// PROCEED: if reboot timeout expired | ||
Progress wait_for_platform_reboot(swss::Select &s); | ||
|
||
// Log error string, set status to RebootStatus_Status_STATUS_FAILURE | ||
// Set status message to error_string. | ||
void log_error_and_set_non_retry_failure(const std::string error_string); | ||
|
||
// Log error string, set status to | ||
// RebootStatus_Status_STATUS_RETRIABLE_FAILURE Set status message to | ||
// error_string. | ||
void log_error_and_set_failure_as_retriable(const std::string error_string); | ||
|
||
|
||
// Request is input only. | ||
// Response is ouput only. | ||
// Return true if preconditions met, false otherwise. | ||
bool check_start_preconditions(const gnoi::system::RebootRequest &request, | ||
NotificationResponse &response); |
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.
Nits: suggest stay consistent by staying pascal case and only use snake case for getters and setters.
c4b69a6
to
f6fcecd
Compare
4b8a987
to
76fa407
Compare
76fa407
to
018b775
Compare
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Why I did it
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)