-
Notifications
You must be signed in to change notification settings - Fork 247
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
Ignition Kernel Argument Support #1168
Comments
This seems to support both whitespace-separated strings as well as distinct entries in an array. What's the rationale for that? Is it saying that e.g. the arguments in a single string must be provided in exactly that order, but otherwise the arguments may be reordered? |
Also I think the problem in openshift/os#503 :
is a general one. A FCOS user might also want to reboot for some other reason - perhaps, similarly to the MCO/OpenShift4 they want to apply OS updates before some workloads can land on a machine. So I think probably what we want is a declarative way to tell Ignition to not reboot in the initramfs. Perhaps to start it's just:
|
In general, users should specify each argument as a separate array entry. The space-separated case is to support specific parameters such as
Hmm, do you have a specific use case in mind? In general, we go out of our way to make the first boot behave identically to the other boots, and we encourage FCOS users to directly launch the version of the OS they want to run. (Which is to say, I think we should continue to discourage an OpenShift-style multiple-reboot model in FCOS.) |
This isn't describing the API that the distribution binary needs to implement. I think initially we were discussing about just using switches for this. But I'm thinking it'd be cleaner really if Ignition just reserializes the (It also has the effect of encouraging implementations to be written in !shell, which is not a bad idea. :) ) |
I think we should keep the API for the helper program as simple as possible, to reduce the integration effort needed by a distro. The initrd typically won't have |
Starting to look at adding the necessary support for this in
? |
|
A bunch of design questions on this proposal. It looks like the execution flow is not explicitely defined/linearized. How is the system expected to behave if there is a stub configuration with something like Both Is this new stage expected to be aware of dracut injected args? |
Do you mean whether this is something that could be used to break the network bootstrapping problem? I'm not sure if this is something we should pursue, because it's inconsistent with how Ignition processes its config otherwise (i.e. fetching everything first and merging/replacing as needed). So in the scenario you described,
Ordering is not enforced, but you can specify multiple kargs in a single element using spaces if you want specific kargs to appear in a certain order (see #1168 (comment) above).
Ignition itself doesn't really care about dracut args, so this is mostly down to the distro implementation. For FCOS/RHCOS, I don't think we should be aware of dracut args at all. Although we do make use of it at runtime for the conditional networking bits, we should strongly encourage components to not bake drop-ins there (see e.g. latchset/clevis@c52caeb). |
Overview
Ignition will add fields to support the adding or removing of kernel arguments. Additionally, a new stage will be introduced which by default is NOT enabled in the current stage chaining. During this new stage, Ignition will take the fields and directly pass them into a binary (the location of which is defined in
internal/distro
to allow overrides) provided by the distribution. Ignition will NOT verify that the kernel arguments have been set, only that the binary returned successfully. Additionally, the binary / wrapping systemd units (provided by the distribution) are responsible for performing a reboot. Ignition will not persistently cache the fetched config, so it will be re-fetched after a reboot.Example Spec Changes
A new top level field
kargs
will be added to the Ignition spec which contains two fields,shouldExist
&shouldNotExist
which both accept lists of strings.Validation
Ignition will fail validation if duplicate entries are found in both the
shouldExist
&shouldNotExist
arrays. It will compare both entire string and space-delimited splits of each string and reject matches. This is done to not require an add/remove specific ordering & to preserve the declarativity of the config.Distributor Documentation
New distribution documentation will be added to Ignition to provide a sample script for how the binary could look, along with making recommendations about stage ordering (the recommended ordering will be sometime after the
fetch
stage and before thedisks
stage).Binary Constraints
Ignition expects that the distribution provided binaries follow these constraints:
The text was updated successfully, but these errors were encountered: