-
Notifications
You must be signed in to change notification settings - Fork 70
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
Update Reboot proto #99
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -108,7 +108,8 @@ message RebootRequest { | |||||||||||||||||||||
uint64 delay = 2; | ||||||||||||||||||||||
// Informational reason for the reboot. | ||||||||||||||||||||||
string message = 3; | ||||||||||||||||||||||
// Optional sub-components to reboot. | ||||||||||||||||||||||
// Optional, sub-components to reboot. | ||||||||||||||||||||||
// If it's not set, reboot the whole network device. | ||||||||||||||||||||||
Comment on lines
+111
to
+112
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||||
repeated types.Path subcomponents = 4; | ||||||||||||||||||||||
// Force reboot if sanity checks fail. (ex. uncommited configuration) | ||||||||||||||||||||||
bool force = 5; | ||||||||||||||||||||||
|
@@ -138,7 +139,9 @@ enum RebootMethod { | |||||||||||||||||||||
// request. | ||||||||||||||||||||||
message CancelRebootRequest { | ||||||||||||||||||||||
string message = 1; // informational reason for the cancel | ||||||||||||||||||||||
repeated types.Path subcomponents = 2; // optional sub-components. | ||||||||||||||||||||||
// Optional, sub-components to cancel reboot. | ||||||||||||||||||||||
// If it's not set, cancel all outstanding reboot requests. | ||||||||||||||||||||||
repeated types.Path subcomponents = 2; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
message CancelRebootResponse { | ||||||||||||||||||||||
|
@@ -149,11 +152,24 @@ message RebootStatusRequest { | |||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
message RebootStatusResponse { | ||||||||||||||||||||||
bool active = 1; // If reboot is active. | ||||||||||||||||||||||
uint64 wait = 2; // Time left until reboot. | ||||||||||||||||||||||
uint64 when = 3; // Time to reboot in nanoseconds since the epoch. | ||||||||||||||||||||||
string reason = 4; // Reason for reboot. | ||||||||||||||||||||||
uint32 count = 5; // Number of reboots since active. | ||||||||||||||||||||||
bool active = 1 [deprecated = true]; // If reboot is active. | ||||||||||||||||||||||
uint64 wait = 2 [deprecated = true]; // Time left until reboot. | ||||||||||||||||||||||
uint64 when = 3 | ||||||||||||||||||||||
[deprecated = true]; // Time to reboot in nanoseconds since the epoch. | ||||||||||||||||||||||
string reason = 4 [deprecated = true]; // Reason for reboot. | ||||||||||||||||||||||
uint32 count = 5 [deprecated = true]; // Number of reboots since active. | ||||||||||||||||||||||
|
||||||||||||||||||||||
message Status { | ||||||||||||||||||||||
types.Path subcomponent = | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use component instead of sub-component? A flat list of components should do the job. Any use cases for hierarchy of components can be determined via gNMI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Component should be mandatory. The component tree is very large on most devices. |
||||||||||||||||||||||
1; // sub-component that the reboot status is for. | ||||||||||||||||||||||
Comment on lines
+163
to
+164
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary newline? |
||||||||||||||||||||||
bool active = 2; // If reboot is active. | ||||||||||||||||||||||
uint64 wait = 3; // Time left until reboot. | ||||||||||||||||||||||
uint64 when = 4; // Time to reboot in nanoseconds since the epoch. | ||||||||||||||||||||||
string reason = 5; // Reason for reboot. | ||||||||||||||||||||||
uint32 count = 6; // Number of reboots since active. | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
repeated Status statuses = 6; | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #not sure the logics correctly - if send a statusrequest that is empty what is the expected return? a statuses with a len of 1? what if there is no reboot in process? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should the Status have the path that is been queried as part of the response? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xw-g The last entry of Reboot Status is covered in the openconfig-platform: last-reboot-reason. leaf last-reboot-reason {
type identityref {
base oc-platform-types:COMPONENT_REBOOT_REASON;
}
description
"This reports the reason of the last reboot of the component.";
} Should the RebootStatusRequest be applicable to only current/planned reboot requests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would return error here if unset - as the total number of components may be large |
||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
// A TimeRequest requests the current time accodring to the target. | ||||||||||||||||||||||
|
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.
hmm i feel like we should require the component to reboot since rebooting a chassis as the default seems like a rather large hammer to "default" to
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.
This PR does require the user/client to be careful with the big hammer.
I had the similar concern, but I also debated with myself that if the field is required, then we probably want to have a very standard way (across all the vendors) to say this
Foo
component/sub-component means the whole device for all vendors? Is it safe to use/components/component/name (identity=CHASSIS)
here? @dploreThere 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.
Should the
subcomponent
be renamed tocomponent
? What is the logic behind naming it asubcomponent
? In openconfig-platform we havecomponent -> subcomponent
relationship. If we assume that reboot works on paths defined in openconfig-platform, then maybe using a subcomponent name is not entirely logical.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.
yes component makes sense - and if not set return not found or invalid parameter
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.
then I suppose to reboot the chassis users should use the
/components/component[name=chassis]
or something similar to indicate the the control plane modules should reboot?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.
yes
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.
We should require a single component. If the component is not specified, there should be an error.
Also agreed that we should explicitly clarify that reboot of /components/component[name=chassis] indicates a full system reboot.