-
Notifications
You must be signed in to change notification settings - Fork 12
Add dynamic configuration to a BootConfig
message.
#158
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
base: main
Are you sure you want to change the base?
Conversation
* (M) proto/bootz.proto - In some cases, the configuration that needs to be applied through the boot process is not immutable per the current specification of the bootz process. This change adds the ability to provide dynamic configuration during an initial boot that may be overwritten later in the process.
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.
Can you please indicate how the boot process should consume all these configs? In the previous design, it was guaranteed that the boot config is a full, valid configuration file that can be consumed by the system (at least during the initial boot).
With two separate configurations:
- do you expect that the NOS should create a single "candidate" before performing any validation, or
- can (or should) we validate boot config (
vendor_config
/oc_config
) and commit it in an independent manner?
In the current specification, there's already some need for combination -- since you might have The proposal here is that this union behaviour is extended, such that the 'candidate' becomes the union of ( I'd expect that if this proposal is accepted that validation is done on the union that is created per the above. |
that's true (in theory; to my knowledge
A configuration blob that can pass validation and be consumed by the system independently from the dynamic configuration; I didn't mean it in terms of overall completeness.
Are we still targeting a practical objective? If an operator knows that
What guarantees that a union of the two "immutable" objects is a valid configuration at a later point? |
yet :-)
Yes -- here's the case that we need to deal with (although it can be simplified if vendors support this more coherently, but today, we find that the development cycle isn't fast enough to realise these simpler solutions):
Today, we have all of these cases. If we got rid of
Testing? We can update the "immutable" config via The practical problem we have today is that ACLs are needed at startup (we don't want to leave a device with no ACLs from a security perspective), but they also need to be updated on an ongoing basis -- i.e., they are not immutable. |
Sure. I'm just skeptical that the existence of the boot namespace is worth the cost at this point. |
I'm not sure that this is the only concern though -- it's also whether there are different owners of this configuration, and the relationship between the two. In the scenario that there is a bootstrap configuration generator, then this can be used to store all the feature-flag/vendor-specific knobs that are required. I'd love to be able to get rid of these, but I do not yet see a path to do so. The boot namespace means that you can have these knobs be isolated, and ensure that they will always apply even if there's some SNAFU in the dynamic config generation. I certainly see the concern -- but I think that this is something that should be handled outside of this change. If we don't have these new fields, the simplification that you're proposing is not actually possible in the future. (Especially given the bootz namespace is already implemented.) |
I can agree with that. For this change, though, can you please add a note that the configs are always unioned before validation/commit? Either to the proto or to the README text. Thanks. |
ACK -- happy to discuss it.
Yes, done in the proto. @marcushines - PTAL. |
Change justification
Consider the scenario that a device is being boostrapped from factory-reset (zero-ised) state. In such cases, the bootz server provides a
BootConfig
which contains the minimum manageable state of the device. This may include some configuration such as ACLs that protect the control-plane of the device. Currently, such an ACL becomes immutable, which means that to change it, a client needs to know that it must also callgnoi.bootconfig.SetBootConfig
as well asgnmi.Set
to change some configuration of the device. This is a workable solution -- but adds some complexity to the calling client system.An alternative design -- proposed herein -- is to allow two different types of configuration to be applied during the initial bootstrap operation:
This simplifies the overall operation for configuration management, since configuration that is truly immutable boot configuration still remains within the bootz namespace, and configuration that is required at boot time but is dynamic remains within a namespace where it can be mutated.
Alternate designs
There are alternate designs that could be considered here.
Configuration management system calls
gnoi.bootconfig.SetBootConfig
as well asgnmi.Set
.Pros:
Cons:
(Proposed) Allow for initial dynamic configuration to be supplied through
bootz
.Pros:
Cons:
gnoi.bootconfig.SetBootConfig
can be called, in these cases, thedynamic_*_config
fields must not be specified otherwise this will override the dynamic configuration.