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

Added the 'no_reboot` flag to the ActivateRequest message. #51

Merged
merged 2 commits into from
Apr 16, 2021

Conversation

tomek-US
Copy link
Contributor

If this flag is set to 'False' then the Target will configure itself
to boot next time with the requested version of the OS but will not
restart immediatelly.

If this flag is set to 'False' then the Target will configure itself
to boot next time with the requested version of the OS but will _not_
restart immediatelly.
@tomek-US tomek-US requested review from robshakir and aashaikh April 13, 2021 20:57
os/os.proto Outdated
// If set to 'False' a separate action to reboot the Target and start using
// the activated OS version is required. This action CAN be executing
// the gNOI.system.Reboot() RPC.
bool activate_and_reboot = 3;
Copy link
Member

Choose a reason for hiding this comment

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

The inverse logic should be used here in order to keep the same behaviour with backward compatibility. Something like "no_reboot" or "activate_only" (proto3 defaults boolean to false when omitted). Where by default the Activate request will activate and reboot the target, unless this flag is set in which only activation will happen, but no reboot. This allows previous and actual versioned client and target implementations to coexist without a fundamental behaviour change of the RPC like it is being proposed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping backward compatibility sounds like good idea ;-) Done.

os/os.proto Outdated
@@ -7,7 +7,7 @@ import "github.com/openconfig/gnoi/types/types.proto";

option go_package = "github.com/openconfig/gnoi/os";

option (types.gnoi_version) = "0.1.0";
option (types.gnoi_version) = "0.2.0";
Copy link
Member

Choose a reason for hiding this comment

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

assuming the suggestion below, I am thinking this would be a micro bump and opposed to minor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@tomek-US tomek-US requested a review from samribeiro April 14, 2021 18:33
@samribeiro samribeiro changed the title Added the 'activate_and_reboot` flag to the ActivateRequest message. Added the 'no_reboot` flag to the ActivateRequest message. Apr 16, 2021
Copy link
Member

@samribeiro samribeiro left a comment

Choose a reason for hiding this comment

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

thanks!

@samribeiro
Copy link
Member

Probably worth regenerating the go code for this proto.

@tomek-US
Copy link
Contributor Author

Thx!

The second commit already includes re-generated Go files.

@tomek-US tomek-US merged commit 5158e6c into master Apr 16, 2021
@tomek-US tomek-US deleted the os-activate-without-reboot branch April 16, 2021 21:14
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.

2 participants