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

Add bootconfig to Activate. This allows the caller to provide #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcushines
Copy link
Contributor

a new bootconfig to the device during activate.

This allows for the device to be provided a minimum configuration to gaurentee compatibility with the new OS or provide OS version specific configuration to allow the new OS to boot.

a new bootconfig to the device during activate.

This allows for the device to be provided a minimum configuration
to gaurentee compatibility with the new OS or provide OS version
specific configuration to allow the new OS to boot.
@marcushines marcushines requested a review from xw-g October 21, 2024 13:58
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11441760490

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 1.142%

Totals Coverage Status
Change from base Build 10565420614: 0.0%
Covered Lines: 166
Relevant Lines: 14537

💛 - Coveralls

Comment on lines +337 to +342
// Bootconfig provides the next boot configuration to load after OS upgrade.
// The device will take all artifacts provided and replace them just as if
// a gnoi.BootConfig.Set was performed on the device.
// The main use case is to facilitate the new OS to utilized a new
// configuration syntax which was not supported in previous versions.
gnoi.bootconfig.SetBootConfigRequest boot_config = 4;
Copy link
Member

Choose a reason for hiding this comment

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

While reviewing this, I had to reason through when a bootconfig change is supposed to take effect. If a client invokes gNOI.BootConfig.SetBootConfig, when is the boot_config loaded or activated? Is it

  1. immediate?
  2. on reboot?
  3. loaded immediately, but application of "configuration items" are implementation dependent? (ie: some items are activated immediately and others may require a reboot).

It took me about 20 minutes to reason through this (I am slow). I suspect it's option 3? I didn't find a strict definition. Probably this should be added.

Unless it's option 2, I am not sure this is really needed? Can't the boot config just be updated after the new OS is installed?
gNOI.OS.Install
gNOI.OS.Activate
(wait for reboot to complete)
gNOI.BootConfig.SetBootConfig

I guess maybe it's an optimization to prevent needing a second reboot if there are configuration items being changed which only take effect on a reboot?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on reboot "next boot configuration to load after OS upgrade."

the example you gave fails for devices which when doing the actiate will try to load the old configuration to validate it still works with the new os and fails...

basically the example you gave is the exact reason this is required

Copy link
Contributor

@xw-g xw-g left a comment

Choose a reason for hiding this comment

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

LGTM.

Did you purposely use SetBootConfigRequest, instead of Bootz.BootConfig, to cover possible g* API breaking changes?

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.

4 participants