8000 [rhcos-4.18] coreos-boot-mount-generator: honor boot= karg better in multipath case by jcapiitao · Pull Request #3506 · coreos/fedora-coreos-config · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[rhcos-4.18] coreos-boot-mount-generator: honor boot= karg better in multipath case #3506

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

Open
wants to merge 5 commits into
base: rhcos-4.18
Choose a base branch
from

Conversation

jcapiitao
Copy link
Member

Backporting #3475 to the rhcos-4.18 branch.

(cherry picked from commit 33421b36)
(cherry picked from commit 0661e4ed)

@jcapiitao jcapiitao changed the base branch from testing-devel to rhcos-4.18 May 14, 2025 15:43
@jcapiitao jcapiitao force-pushed the backport-f-c-c-3475 branch 2 times, most recently from bc0ca58 to 9dba893 Compare May 15, 2025 13:53
jcapiitao and others added 2 commits May 15, 2025 16:47
We don't need to test on FCOS for rhcos stable branches.
As described in openshift/os#1787, we need to
loosen up our restriction that only a single `boot` and `root` labeled
filesystem exists, at least past the first boot to start.

There is code already that injects `boot` and `root` kargs to specify
the exact UUID we want so this is feasible.

There's currently two ways in which the boot device can be specified:
- the `/run/coreos/bootfs_uuid` file exists; this is written by rdcore
  but is only available on first boot
- a `boot=` karg, which supports the "dracut convention" (i.e.
  `boot=LABEL=` or `boot=UUID=`, etc.), exists; this is usually written
  by rdcore but is only available on subsequent boots

If neither of those are specified, then we just default to
`by-label/boot`.

But currently, if multipath is enabled, we override all that and just
always use `by-label/dm-mpath-boot`. This is not great, because a UUID
might've been specified, and that's much stronger than a label. It also
directly conflicts with the mentioned higher level goal of supporting
multiple `boot` labels.

Instead, rework multipath support so that it respects both `boot=` kargs
and `bootfs_uuid` files. When possible, we use the multipathed version
of the specified UUID/label written by our udev rules because it's less
racy. Otherwise, we just use the non-multipathed one.

(cherry picked from commit 33421b3)
@jcapiitao jcapiitao force-pushed the backport-f-c-c-3475 branch from 9dba893 to 2aeea0c Compare May 15, 2025 14:48
dustymabe
dustymabe previously approved these changes May 15, 2025
Copy link
Member
@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

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

LGTM. Though note this multipath.resilient test may be flaky so we may need to denylist it in 4.18 until a new dracut can be released.

coreos/fedora-coreos-tracker#1937

@jcapiitao
Copy link
Member Author

/retest

…` karg

We want to be able to support the system having multiple filesystems
present with the `root` and `boot` labels.

This already mostly works today, because we add `root=UUID=` and
`boot=UUID=` kargs which disambiguate them. The exception is multipath,
where some places hardcode `/dev/disk/by-label/dm-mpath-[rb]oot` and
so don't make use of the UUIDs at all. This obviously then becomes
ambiguous in the presence of other similarly-labeled filesystems.

The previous patch plugged a large gap in this story.

Let's add a new test that covers the multipath + multiple boot disks +
no root kargs to ensure this keeps functioning.

Part of openshift/os#1787.

(cherry picked from commit 0661e4e)
@jcapiitao jcapiitao force-pushed the backport-f-c-c-3475 branch from 2aeea0c to e4b223a Compare May 16, 2025 14:43
@dustymabe dustymabe dismissed jbtrystram’s stale review May 16, 2025 14:54

In the past we've just dropped all tests.

@dustymabe
Copy link
Member

/ok-to-test

@dustymabe
Copy link
Member

I'm happy to merge this now, but if we're going to add the dracut patch should we just wait for that to land and include it in this PR so we don't have to bump the config in openshift/os twice?

dustymabe added 2 commits May 16, 2025 16:58
This is a new test and it's failing on s390x so let's
deny it for now while we investigate.

(cherry picked from commit 626c782)
This test is proving to be a bit flaky. Let's denylist it for now
while we wait for an upstream fix [1].

[1] coreos/fedora-coreos-tracker#1937 (comment)

(cherry picked from commit 4f3fce5)
@jcapiitao
Copy link
Member Author

I'm happy to merge this now, but if we're going to add the dracut patch should we just wait for that to land and include it in this PR so we don't have to bump the config in openshift/os twice?

I just added the denylist patches but maybe I misunderstood. So IIUC, you're preparing a patch to land on testing-devel, and then I'll cherry-pick in this PR, is that correct ? If so, I'm ok to wait.

@jcapiitao
Copy link
Member Author

I'm happy to merge this now, but if we're going to add the dracut patch should we just wait for that to land and include it in this PR so we don't have to bump the config in openshift/os twice?

I just added the denylist patches but maybe I misunderstood. So IIUC, you're preparing a patch to land on testing-devel, and then I'll cherry-pick in this PR, is that correct ? If so, I'm ok to wait.

Waiting for #3508 to be merged, then I'll backport it in this PR

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
0