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

treefile: Deprecate initramfs-args key #3834

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jul 8, 2022

Users should use /etc/dracut.conf.d instead. This option does not work
when regenerating the initramfs in the container flow.

We'll want to keep supporting it internally for a while in the upgrade
code, until all known composers have moved away from it, and reasonably
enough time for client systems to get the resulting updated trees.

See discussions in #3799.

@openshift-ci
Copy link

openshift-ci bot commented Jul 8, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jlebon
Copy link
Member Author

jlebon commented Jul 8, 2022

Let's hold this until coreos/fedora-coreos-config#1828 bakes for a bit.

@jlebon jlebon force-pushed the pr/deprecate-initramfs-etc branch from 5570860 to 12b9c44 Compare July 8, 2022 21:28
@jlebon
Copy link
Member Author

jlebon commented Jul 8, 2022

One thing I realized is that this hints at composers having an easy way to add files to /etc/dracut.conf.d. We have overlay.d which is purely a cosa thing, but I think it's reasonable to expect something similar implemented in other tools. Worst case, they can use a postprocess script for now. (Though I do think we should eventually fold overlay.d into rpm-ostree proper, i.e. an add-dirs).

Comment on lines 1455 to 1456
.map(|v| !v.is_empty())
.unwrap_or_default()
Copy link
Member

Choose a reason for hiding this comment

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

This is equivalent to the single-step .map_or(false, |v| !v.is_empty())) - but I know we use this spelling in other places and it seems fine as is. Just a note. I may just be showing off my Rust combinator brown belt 😉

@cgwalters
Copy link
Member

One thing I realized is that this hints at composers having an easy way to add files to /etc/dracut.conf.d. We have overlay.d which is purely a cosa thing, but I think it's reasonable to expect something similar implemented in other tools. Worst case, they can use a postprocess script for now. (Though I do think we should eventually fold overlay.d into rpm-ostree proper, i.e. an add-dirs).

I agree - though it's worth noting this applies for building new "base images". Anyone who is e.g. writing a Dockerfile that derives from a base image already has tools for this in the Dockerfile syntax that copies things from the context directory, etc. (More generally of course any container build tooling can be used)

Users should use `/etc/dracut.conf.d` instead. This option does not work
when regenerating the initramfs in the container flow.

We'll want to keep supporting it internally for a while in the upgrade
code, until all known composers have moved away from it, and reasonably
enough time for client systems to get the resulting updated trees.

See discussions in coreos#3799.
@jlebon jlebon force-pushed the pr/deprecate-initramfs-etc branch from 12b9c44 to eaeaff4 Compare July 9, 2022 16:26
@cgwalters
Copy link
Member

/retest

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

LGTM; anything keeping this in draft?

@jlebon jlebon marked this pull request as ready for review July 12, 2022 20:00
@jlebon jlebon enabled auto-merge July 12, 2022 20:00
@jlebon jlebon merged commit fba5230 into coreos:main Jul 12, 2022
@jlebon jlebon deleted the pr/deprecate-initramfs-etc branch April 23, 2023 23:31
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 to jlebon/os that referenced this pull request Sep 28, 2023
These are all already specified in the `dracut.conf.d` dropins we
inherit from FCOS.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 28, 2023
Add context links from git archeology while we're here.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 28, 2023
This dates back from when we wanted to use NetworkManager in the initrd
before it was the default (in RHEL8). It's the default now, so we don't
need it anymore.

Remove related commented-out lines in `common.yaml` while we're here.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 28, 2023
It's been a while since we've moved to only propagating NM keyfiles from
the initrd to the real root, so we no longer need this.

(Note this has no impact on whether ifcfg in the real root is supported,
which it still is. It just stops uselessly generating ifcfg files in
the initrd.)

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 28, 2023
`ignition` is already pulled in by a multitude of dracut modules, and
`fips` is already pulled in by `rhcos-fips`.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 28, 2023
The `iscsi` module is already included by default in a non-hostonly
initramfs.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 29, 2023
It's included by default currently so we don't need this. A patch in FCOS
will actually make it so that we don't pull it in at all:
coreos/fedora-coreos-config#2642

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 29, 2023
`ignition` is already pulled in by a multitude of dracut modules, and
`fips` is already pulled in by `rhcos-fips`.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to jlebon/os that referenced this pull request Sep 29, 2023
The `iscsi` module is already included by default in a non-hostonly
initramfs.

Part of the move away `initramfs-args`, which is deprecated:
coreos/rpm-ostree#3834
jlebon added a commit to coreos/fedora-coreos-config 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
This pull request was closed.
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.

2 participants