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

Move from initramfs-args in manifest to dracut.conf.d files #1828

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

cgwalters
Copy link
Member

See coreos/rpm-ostree#3799

This way when we run dracut in a container build, we naturally
pick up the same config we used for server side builds.

jmarrero
jmarrero previously approved these changes Jul 8, 2022
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

jlebon
jlebon previously approved these changes Jul 8, 2022
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Just to make sure, did you sanity-check locally that this works as expected? At least the ignition module would've been installed anyway as a dependency of other dracut modules we ship. Would be nice if dracut actually printed the dropins it read in.

See coreos/rpm-ostree#3799

This way when we run dracut in a container build, we naturally
pick up the same config we used for server side builds.
@cgwalters
Copy link
Member Author

Just to make sure, did you sanity-check locally that this works as expected?

Yep! Also CI covers everything we care about for this, AFAIK. (Right?)

At least the ignition module would've been installed anyway as a dependency of other dracut modules we ship.

Yep, I dropped the bit to enable it directly, and I see it still being enabled as expected since we have

depends() {
    echo ignition rdcore
}

in 40ignition-ostree.

Would be nice if dracut actually printed the dropins it read in.

Well, I did mess up things by not having a leading space, and dracut does warn about that. (I love how awesome the trap there is from "let's just make our config files executable shell script")

@cgwalters
Copy link
Member Author

BTW as a followup we can add a change to add a lot more explicit excludes to quiet this error spew:

dracut: dracut module 'systemd-networkd' will not be installed, because command 'networkctl' could not be found!
dracut: dracut module 'systemd-networkd' will not be installed, because command '/usr/lib/systemd/systemd-networkd' could not be found!
dracut: dracut module 'systemd-networkd' will not be installed, because command '/usr/lib/systemd/systemd-networkd-wait-online' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-daemon' will not be installed, because command 'dbus-daemon' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -0,0 +1,7 @@
# We don't support root on NFS, so we don't need it in the initramfs. It also
Copy link
Member

Choose a reason for hiding this comment

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

Worth noting these dropins are going to be inherited by RHCOS, while previously the manifest bits in fedora-coreos-base.yaml were FCOS-specific. We do want those for RHCOS too, but strangely enough it looks like in https://github.com/openshift/os/blob/01f98943688b5b61a9276127a1b7f06aafd0b42a/common.yaml#L32-L53 we're explicitly pulling in iscsi in RHCOS but explicitly omitting it here.

I think dracut will give priority to the cmdline arg in RHCOS, but worth digging into the history there. And of course we should delete that hunk in favour of dracut.conf.d there too.

@cgwalters cgwalters merged commit 9997df7 into coreos:testing-devel Jul 11, 2022
jlebon added a commit to jlebon/fedora-coreos-config that referenced this pull request Sep 28, 2023
In 9997df7 ("Move from `initramfs-args` in manifest to `dracut.conf.d`
files"), we migrated FCOS to use dracut dropins rather than CLI args.
One notable semantic change was that these dropins were also now
inherited by RHCOS.

One of the migrated directives was omitting the `iscsi` module. But RHCOS
OTOH has always included the `iscsi` dracut module, using `--add iscsi`.
This apparent conflict was noted in a comment and deemed safe[[1]].
And in fact, it *did* seem to work at the time, but only because there
was a bug in dracut: RHCOS happened to define some `--omit` arguments
as well and the bug made it so that the CLI arguments overrode the
inherited `omit_dracutmodules` dropin directives rather than being added
to them.[[2]]

The presence of this bug meant that `--add iscsi` still worked.
However, in RHEL9, the bug was fixed[[3]], which meant that we now
stopped pulling in the `iscsi` module since it's listed in the set
of modules to omit (`--add` arguments cannot undo earlier `--omit`/
`omit_dracutmodules` arguments).

The minimal fix needed here is to stop omitting the `iscsi` module. This
fixes https://issues.redhat.com/browse/OCPBUGS-19811, where some users
had already taken a dep on iSCSI iBFT support for autoconfiguration. It
also aligns with efforts to support root-on-iSCSI in the near future,
and there's no reason to not have that work happen in FCOS too.

A related larger task is to stop using `initramfs-args` in RHCOS since
it's now deprecated.[[4]]

[1]: coreos#1828 (comment)
[2]: dracutdevs/dracut#1341
[3]: dracutdevs/dracut#1342
[4]: coreos/rpm-ostree#3834
jlebon added a commit that referenced this pull request Sep 29, 2023
In 9997df7 ("Move from `initramfs-args` in manifest to `dracut.conf.d`
files"), we migrated FCOS to use dracut dropins rather than CLI args.
One notable semantic change was that these dropins were also now
inherited by RHCOS.

One of the migrated directives was omitting the `iscsi` module. But RHCOS
OTOH has always included the `iscsi` dracut module, using `--add iscsi`.
This apparent conflict was noted in a comment and deemed safe[[1]].
And in fact, it *did* seem to work at the time, but only because there
was a bug in dracut: RHCOS happened to define some `--omit` arguments
as well and the bug made it so that the CLI arguments overrode the
inherited `omit_dracutmodules` dropin directives rather than being added
to them.[[2]]

The presence of this bug meant that `--add iscsi` still worked.
However, in RHEL9, the bug was fixed[[3]], which meant that we now
stopped pulling in the `iscsi` module since it's listed in the set
of modules to omit (`--add` arguments cannot undo earlier `--omit`/
`omit_dracutmodules` arguments).

The minimal fix needed here is to stop omitting the `iscsi` module. This
fixes https://issues.redhat.com/browse/OCPBUGS-19811, where some users
had already taken a dep on iSCSI iBFT support for autoconfiguration. It
also aligns with efforts to support root-on-iSCSI in the near future,
and there's no reason to not have that work happen in FCOS too.

A related larger task is to stop using `initramfs-args` in RHCOS since
it's now deprecated.[[4]]

[1]: #1828 (comment)
[2]: dracutdevs/dracut#1341
[3]: dracutdevs/dracut#1342
[4]: coreos/rpm-ostree#3834
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this pull request Oct 10, 2023
In 9997df7 ("Move from `initramfs-args` in manifest to `dracut.conf.d`
files"), we migrated FCOS to use dracut dropins rather than CLI args.
One notable semantic change was that these dropins were also now
inherited by RHCOS.

One of the migrated directives was omitting the `iscsi` module. But RHCOS
OTOH has always included the `iscsi` dracut module, using `--add iscsi`.
This apparent conflict was noted in a comment and deemed safe[[1]].
And in fact, it *did* seem to work at the time, but only because there
was a bug in dracut: RHCOS happened to define some `--omit` arguments
as well and the bug made it so that the CLI arguments overrode the
inherited `omit_dracutmodules` dropin directives rather than being added
to them.[[2]]

The presence of this bug meant that `--add iscsi` still worked.
However, in RHEL9, the bug was fixed[[3]], which meant that we now
stopped pulling in the `iscsi` module since it's listed in the set
of modules to omit (`--add` arguments cannot undo earlier `--omit`/
`omit_dracutmodules` arguments).

The minimal fix needed here is to stop omitting the `iscsi` module. This
fixes https://issues.redhat.com/browse/OCPBUGS-19811, where some users
had already taken a dep on iSCSI iBFT support for autoconfiguration. It
also aligns with efforts to support root-on-iSCSI in the near future,
and there's no reason to not have that work happen in FCOS too.

A related larger task is to stop using `initramfs-args` in RHCOS since
it's now deprecated.[[4]]

[1]: coreos#1828 (comment)
[2]: dracutdevs/dracut#1341
[3]: dracutdevs/dracut#1342
[4]: coreos/rpm-ostree#3834
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this pull request Oct 10, 2023
In 9997df7 ("Move from `initramfs-args` in manifest to `dracut.conf.d`
files"), we migrated FCOS to use dracut dropins rather than CLI args.
One notable semantic change was that these dropins were also now
inherited by RHCOS.

One of the migrated directives was omitting the `iscsi` module. But RHCOS
OTOH has always included the `iscsi` dracut module, using `--add iscsi`.
This apparent conflict was noted in a comment and deemed safe[[1]].
And in fact, it *did* seem to work at the time, but only because there
was a bug in dracut: RHCOS happened to define some `--omit` arguments
as well and the bug made it so that the CLI arguments overrode the
inherited `omit_dracutmodules` dropin directives rather than being added
to them.[[2]]

The presence of this bug meant that `--add iscsi` still worked.
However, in RHEL9, the bug was fixed[[3]], which meant that we now
stopped pulling in the `iscsi` module since it's listed in the set
of modules to omit (`--add` arguments cannot undo earlier `--omit`/
`omit_dracutmodules` arguments).

The minimal fix needed here is to stop omitting the `iscsi` module. This
fixes https://issues.redhat.com/browse/OCPBUGS-19811, where some users
had already taken a dep on iSCSI iBFT support for autoconfiguration. It
also aligns with efforts to support root-on-iSCSI in the near future,
and there's no reason to not have that work happen in FCOS too.

A related larger task is to stop using `initramfs-args` in RHCOS since
it's now deprecated.[[4]]

[1]: coreos#1828 (comment)
[2]: dracutdevs/dracut#1341
[3]: dracutdevs/dracut#1342
[4]: coreos/rpm-ostree#3834
aaradhak pushed a commit to aaradhak/fedora-coreos-config that referenced this pull request Mar 18, 2024
In 9997df7 ("Move from `initramfs-args` in manifest to `dracut.conf.d`
files"), we migrated FCOS to use dracut dropins rather than CLI args.
One notable semantic change was that these dropins were also now
inherited by RHCOS.

One of the migrated directives was omitting the `iscsi` module. But RHCOS
OTOH has always included the `iscsi` dracut module, using `--add iscsi`.
This apparent conflict was noted in a comment and deemed safe[[1]].
And in fact, it *did* seem to work at the time, but only because there
was a bug in dracut: RHCOS happened to define some `--omit` arguments
as well and the bug made it so that the CLI arguments overrode the
inherited `omit_dracutmodules` dropin directives rather than being added
to them.[[2]]

The presence of this bug meant that `--add iscsi` still worked.
However, in RHEL9, the bug was fixed[[3]], which meant that we now
stopped pulling in the `iscsi` module since it's listed in the set
of modules to omit (`--add` arguments cannot undo earlier `--omit`/
`omit_dracutmodules` arguments).

The minimal fix needed here is to stop omitting the `iscsi` module. This
fixes https://issues.redhat.com/browse/OCPBUGS-19811, where some users
had already taken a dep on iSCSI iBFT support for autoconfiguration. It
also aligns with efforts to support root-on-iSCSI in the near future,
and there's no reason to not have that work happen in FCOS too.

A related larger task is to stop using `initramfs-args` in RHCOS since
it's now deprecated.[[4]]

[1]: coreos#1828 (comment)
[2]: dracutdevs/dracut#1341
[3]: dracutdevs/dracut#1342
[4]: coreos/rpm-ostree#3834