Skip to content

potential kernel arguments options support for all installers (HMS-8999)#1786

Merged
mvo5 merged 8 commits into
osbuild:mainfrom
mvo5:kernel-args-for-installer-more-2
Oct 7, 2025
Merged

potential kernel arguments options support for all installers (HMS-8999)#1786
mvo5 merged 8 commits into
osbuild:mainfrom
mvo5:kernel-args-for-installer-more-2

Conversation

@mvo5

@mvo5 mvo5 commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

When debugging a test failure of centos9 iso install I want to use the cool new feature by Simon to add kernel arguments to the installer (c.f. https://github.com/osbuild/images/pull/1727/files) test in bib via a blueprint kernel append.

I noticed then that its currently implemented for a subset of our installers, so I created this quick draft to see what it would take and it seems straightforward. Is there a reason not to support the kargs for the missing installers? If not I'm happy to flesh this one out more, it needs tests (obviously) but I did not want to write them before there is agreement that is what we want.

[edit/reminder: the AanacondaContainerInstaller needs a coresponding change in bib to fully work]

Note that while this enables kernel.append in the lower levels there is a blueprint options check that will prevent this for e.g. edge-installer so if we want to support this for real we will need to enable it in the checkOptions() for blueprints code (which is currently not fine-grained enough to allow setting Kernel.append only but not kernel.name and we will need #1216 first I think.

@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch 4 times, most recently from ac591b5 to 65a1bcc Compare August 25, 2025 19:07
@supakeen supakeen changed the title [RFC] kernel arguments options support for all installers [RFC] kernel arguments options support for all installers (HMS-8999) Aug 26, 2025
@supakeen

Copy link
Copy Markdown
Member

@mvo5 Why is this draft?

@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch 3 times, most recently from 195a8b9 to 5a81a0a Compare August 26, 2025 13:26
@mvo5

mvo5 commented Aug 26, 2025

Copy link
Copy Markdown
Contributor Author

@mvo5 Why is this draft?

Mostly because I wanted to add a test and some tiny cleanups/research. But happy to un-draft. We will need consensus if this is what we want though (I think we do but idk about the others).

@mvo5 mvo5 marked this pull request as ready for review August 26, 2025 13:28
@mvo5 mvo5 requested a review from a team as a code owner August 26, 2025 13:28
@mvo5 mvo5 requested review from croissanne, supakeen and thozza August 26, 2025 13:28
// the kernel options from the imageConfig but we only set
// those in the rawImage.OSTreeDeploymentCustomizations and
// not in the bootTreePipeline. Its unclear if we should change
// this or not. Its inconsistent with the other installers but

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one is actually (even more) interesting - we allow customizations.kernel for the iot-simplified-installer image type but afaict setting it has no effect(?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yep, that's funky. Maybe this is from the time that we wanted blueprints to be able to apply to multiple image types even though silently discarding stuff is bad (in my opinion).

We can probably drop this from the allowed customizations as it has no effect?

@achilleas-k achilleas-k Sep 18, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm a Muppet (again) - I was confused by gen-manifests-diff not showing anything when doing #1880 but its just a silly bug in gen-manifests-diff (I opened #1881 to address that)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry for this blunder - I think the comment itself is (largely) correct though or do you want me to clarify further and/or fix this (could be a followup) it would change existing manifest checksums iirc.

@mvo5 mvo5 changed the title [RFC] kernel arguments options support for all installers (HMS-8999) [RFC] potential kernel arguments options support for all installers (HMS-8999) Aug 27, 2025
supakeen
supakeen previously approved these changes Aug 27, 2025

@supakeen supakeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, this is useful for at least all Anaconda installers as Anaconda switches behavior based on the kernel arguments present.

In particular this resolves the linked bug once we release the network installer.

@mvo5

mvo5 commented Aug 27, 2025

Copy link
Copy Markdown
Contributor Author

Sorry, had to force push because of conflicts

supakeen
supakeen previously approved these changes Aug 27, 2025
@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch from 88d568b to 6709cc6 Compare August 28, 2025 06:28
@mvo5

mvo5 commented Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

Sorry, conflicts again, force pushed again, this time from in checksum manifests (so trivial)

supakeen
supakeen previously approved these changes Aug 28, 2025
mvo5 added a commit to mvo5/images that referenced this pull request Sep 16, 2025
This commit re-adds the `kernel.append` customization to
the {minimal,image}-installer and also add it to the test
manifests.

This option was supported via
osbuild#1786
but when adding the blueprint options checking via the
YAML it seems this support got lost.
@achilleas-k

Copy link
Copy Markdown
Member

The option needs to be added to the image types that support it now. Let's also include it in one of the test/configs/ for installers.

AFAICT we no longer allow kernel.append for any of our installers (via the new supported_options mechanism), even #1727 seems to be no longer working. I'm happy to add it back but its orthogonal to this PR (this PR just enables the ability to add it and unifies the backend a bit). Should I open a new one that re-enables kernel.append for {minimal,image}-installer that also adds the config?

[edit: I opened https://github.com//pull/1870]

Sorry, I got a bit confused and thought this PR was adding support for specifying kernel args in the blueprint for installer types.

mvo5 added a commit to mvo5/images that referenced this pull request Sep 19, 2025
This commit re-adds the `kernel.append` customization to
the {minimal,image}-installer and also add it to the test
manifests.

This option was supported via
osbuild#1786
but when adding the blueprint options checking via the
YAML it seems this support got lost.
mvo5 added a commit to mvo5/images that referenced this pull request Sep 19, 2025
This commit re-adds the `kernel.append` customization to
the {minimal,image}-installer and also add it to the test
manifests.

This option was supported via
osbuild#1786
but when adding the blueprint options checking via the
YAML it seems this support got lost.
github-merge-queue Bot pushed a commit that referenced this pull request Sep 19, 2025
This commit re-adds the `kernel.append` customization to
the {minimal,image}-installer and also add it to the test
manifests.

This option was supported via
#1786
but when adding the blueprint options checking via the
YAML it seems this support got lost.
@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch from ab80310 to cceffc7 Compare September 22, 2025 11:05
@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch from cceffc7 to 53d3b72 Compare September 22, 2025 11:30
@mvo5

mvo5 commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

[..]

[edit: I opened https://github.com//pull/1870]

Sorry, I got a bit confused and thought this PR was adding support for specifying kernel args in the blueprint for installer types.

No worries, I rebased now that #1870 is merged and this should be ready again (also fixed the typo that Thozza pointed out).

@mvo5 mvo5 requested a review from supakeen September 29, 2025 11:28
@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch from 53d3b72 to b60d339 Compare September 29, 2025 11:33
@mvo5 mvo5 requested a review from thozza October 3, 2025 14:01
@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch from b60d339 to 970678d Compare October 6, 2025 07:25
@mvo5

mvo5 commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

Had to force push because GH claimed conflicts (which git resolved without any changes from my side)

mvo5 added 8 commits October 7, 2025 15:05
Support for kernel options in the iso got added to the tar
installer in osbuild#1727.

For consistency this commit also enables it for the other
installers via the pre-existing `AdditionalKernelOpts`
that is part of the `manifest.InstallerCustomizations`.

A helper to read the kernel options from the customizations
and default image type(s) is extracted as well.
We can drop the (now) special handling of kernel args via the
OSCustomizations in the tar installer. With the previous commit
we use the manifest.InstallerCustomizations.AdditionalKernelOpts
to handle the kernel arguments which is enough (this is also
validated by the fact that the existing TestTarInstallerKernelOpts
does not need to change).
Rename the manifest.InstallerCustomizations.AdditionalKernelOpts
to KernelOptionsAppend to be similar to the existing
OSCustomizations that also have the same job. This makes it
easier to reason that both options do the same, one for the
os pipeline, one for the installer pipeline(s).
This adds a missing unit test for the kernel options extraction
via the installerCustomizations.
There are some stray newlines that visually distract from
the error handling. This commit removes them.
This commit makes the code similar to the other installers
when handling the kernelOpts options. Ideally we would have
one shared helper but one step at a time.
The fedora `iot-installer` image sets default image type
kernel options that were previously not honored by the
image type. With the unification of the installer kernel
options it is no honored which leads to a manifest diff.

It is not clear if we want these kernel options or not
but this commit is conservative and keeps the old
behavior by just unsetting the kernel options in the
"iot-installer" image options.
The OSTreeSimplifiedInstaller is not an anaconda installer
but it still uses some of the anaconda structs. So lets
move it to use the same installer customizations.

Note that we cannot use the InstallerCustomizations.KernelAppend
with it as it will lead to a diff in the rhel-9.x
edge-simplified-installer image:
```yaml
--- /tmp/tmp07t_j3mj/ref/rhel_9.7-x86_64-edge_simplified_installer-edge_ostree_pull_device.json	2025-08-26 15:10:18.721496181 +0200
+++ /tmp/tmp07t_j3mj/new/rhel_9.7-x86_64-edge_simplified_installer-edge_ostree_pull_device.json	2025-08-26 15:10:21.201572008 +0200
@@ -1100,7 +1100,10 @@
                 "coreos.inst.isoroot=RHEL-9-7-0-BaseOS-x86_64",
                 "coreos.inst.install_dev=/dev/sda",
                 "coreos.inst.image_file=/run/media/iso/image.raw.xz",
-                "coreos.inst.insecure"
+                "coreos.inst.insecure",
+                "modprobe.blacklist=vc4",
+                "rw",
+                "coreos.no_persist_ip"
               ]
             },
             "isolabel": "RHEL-9-7-0-BaseOS-x86_64",
@@ -1259,7 +1262,10 @@
                 "coreos.inst.isoroot=RHEL-9-7-0-BaseOS-x86_64",
                 "coreos.inst.install_dev=/dev/sda",
                 "coreos.inst.image_file=/run/media/iso/image.raw.xz",
-                "coreos.inst.insecure"
+                "coreos.inst.insecure",
+                "modprobe.blacklist=vc4",
+                "rw",
+                "coreos.no_persist_ip"
               ]
             }
           }
```
This is because the edge-simplified-installer for rhel uses
the kernel options from the base image type only for the
deployed system but does not add it to the ISO kernel commandline.

Its unclear if we should unify this or not but this commit errs
on the side of caution.
@mvo5 mvo5 force-pushed the kernel-args-for-installer-more-2 branch from 970678d to 1e5ef98 Compare October 7, 2025 13:07

@supakeen supakeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you.

@mvo5 mvo5 added this pull request to the merge queue Oct 7, 2025
Merged via the queue into osbuild:main with commit 50c59d8 Oct 7, 2025
23 checks passed
@mvo5 mvo5 deleted the kernel-args-for-installer-more-2 branch October 7, 2025 15:02
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