Skip to content

Commit c844e0d

Browse files
committed
image: fix kernel options compat in AnacondaOSTreeInstaller
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.
1 parent 56703d2 commit c844e0d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

data/distrodefs/fedora/imagetypes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,8 @@ image_types:
16381638
image_config:
16391639
<<: *image_config_iot_enabled_services
16401640
locale: "en_US.UTF-8"
1641+
# iot-installer is not using the default ostree kernel options
1642+
kernel_options:
16411643
package_sets:
16421644
installer:
16431645
- *anaconda_pkgset

pkg/image/anaconda_ostree_installer.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
100100
if img.Kickstart.Path == "" {
101101
img.Kickstart.Path = osbuild.KickstartPathOSBuild
102102
}
103-
bootTreePipeline.KernelOpts = []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.InstallerCustomizations.ISOLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.InstallerCustomizations.ISOLabel, img.Kickstart.Path)}
103+
kernelOpts := []string{fmt.Sprintf("inst.stage2=hd:LABEL=%s", img.InstallerCustomizations.ISOLabel), fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", img.InstallerCustomizations.ISOLabel, img.Kickstart.Path)}
104104
if anacondaPipeline.InstallerCustomizations.FIPS {
105-
bootTreePipeline.KernelOpts = append(bootTreePipeline.KernelOpts, "fips=1")
105+
kernelOpts = append(kernelOpts, "fips=1")
106106
}
107+
kernelOpts = append(kernelOpts, img.InstallerCustomizations.KernelOptionsAppend...)
108+
bootTreePipeline.KernelOpts = kernelOpts
107109

108110
var subscriptionPipeline *manifest.Subscription
109111
if img.Subscription != nil {

0 commit comments

Comments
 (0)