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

Fix s390x live ISO booting, enable Ignition embedding, enable ISO install tests #3283

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Dec 14, 2022

This patch series fixes the s390x live ISO so that it can successfully boot, then adds support for Ignition config embedding like on other arches, and then enables some ISO tests, which successfully pass:

[coreos-assembler]$ kola testiso -S --no-pxe
Skipping iso-as-disk; not supported on s390x
Skipping miniso-install and miniso-install-nm; not supported on s390x
Testing scenarios: [iso-offline-install iso-live-login]
Ignoring verification of signature on metal image
PASS: iso-offline-install ( + metal) (1m58.02s)
PASS: iso-live-login ( + metal) (10.689s)

I've split prep patches into a separate PR: #3284. The remaining two commits will stay here. The following is the commit message for the primary one:


This patch will allow users to embed Ignition configs in s390x ISOs.
This narrows the live ISO gap a bit between s390x and other arches (but
notably, ISO kargs support is still missing). It also crucially unblocks
running live ISO tests.

s390x does not support layered initrds, so to do this, we allocate space
directly in the initramfs passed to mk-s390img for the Ignition
config. We then create a new /coreos/igninfo.json file in the ISO
containing the metadata on how to find the Ignition embed area. On
!s390x, where layered initrds are supported, we point at ignition.img,
which maintains current behaviour. On s390x, we point at the right
offset of the reserved space in the cdboot.img.

coreos-installer will look for this igninfo.json file and embed the
Ignition config in the area to which it points.

@jlebon
Copy link
Member Author

jlebon commented Dec 14, 2022

Requires: coreos/coreos-installer#1070

@nikita-dubrovskii
Copy link
Contributor

LGTM,
tested on s390x

@jlebon jlebon requested a review from bgilbert January 16, 2023 21:56
@jacobemery
Copy link

The ci/prow/rhcos test doesn't seem to have run. Is there a way to force it to?

@carbonin
Copy link

To be clear, this is adding a new ignition info file for all architectures, but using it is only required for s390x, right?
Or put another way, the ignition should still be embedded in the ignition.img file for non-s390x architectures?

@carbonin
Copy link

carbonin commented Feb 15, 2023

fixes the s390x live ISO so that it can successfully boot

This implies that it doesn't work at all right now, is that correct?

We have someone currently reporting an issue booting our s390x ISO that looks like this:

[  93.158030] localhost systemd[1]: dev-disk-by\x2dlabel-rhcos\x2d412.86.202212081411\x2d0.device: Job dev-disk-by\x2dlabel-rhcos\x2d412.86.202212081411\x2d0.device/start failed with result 'timeout'.
...
[  93.193906] localhost sh[811]: mount: /run/media/iso: special device /dev/disk/by-label/rhcos-412.86.202212081411-0 does not exist.

Is that roughly what we should expect with the current live iso?

@carbonin
Copy link

cc @apodvrat

@jlebon
Copy link
Member Author

jlebon commented Feb 15, 2023

To be clear, this is adding a new ignition info file for all architectures, but using it is only required for s390x, right?

Right. To be more specific, it will be used by coreos-installer on all arches, but will gracefully fallback to assume ignition.img if missing (see coreos/coreos-installer#1070).

Or put another way, the ignition should still be embedded in the ignition.img file for non-s390x architectures?

Ideally you'd check igninfo.json for embedding details like coreos-installer will do. But that said, we don't have any plans to change the ignition.img setup on !s390x. (Note also this whole thing is still in RFC state.)

fixes the s390x live ISO so that it can successfully boot

This implies that it doesn't work at all right now, is that correct?

It used to not work at all. The prep patches I've split out into #3284 makes it at least bootable. But those patches are not in 4.12 and earlier.

Is that roughly what we should expect with the current live iso?

Yes, for 4.12 ISOs and earlier.

Copy link
Contributor

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

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

LGTM generally!

src/cmd-buildextend-live Show resolved Hide resolved
src/cmd-buildextend-live Outdated Show resolved Hide resolved
src/cmd-buildextend-live Outdated Show resolved Hide resolved
src/cmd-buildextend-live Outdated Show resolved Hide resolved
This patch will allow users to embed Ignition configs in s390x ISOs.
This narrows the live ISO gap a bit between s390x and other arches (but
notably, ISO kargs support is still missing). It also crucially unblocks
running live ISO tests.

s390x does not support layered initrds, so to do this, we allocate space
directly in the initramfs passed to `mk-s390img` for the Ignition
config. We then create a new `/coreos/igninfo.json` file in the ISO
containing the metadata on how to find the Ignition embed area. On
!s390x, where layered initrds are supported, we point at `ignition.img`,
which maintains current behaviour. On s390x, we point at the right
offset of the reserved space in the `cdboot.img`.

coreos-installer will look for this `igninfo.json` file and embed the
Ignition config in the area to which it points.
Add `iso-live-login` which should already work.

Now that we have Ignition embedding support in the s390x ISO, we can
also test `iso-offline-install`. `iso-install` should also work but for
consistency with other !x86_64 arches, we don't test it.

The `mpath` variant is currently failing but should work. Keep it
disabled for now so we don't introduce a failure that immediately has to
be denylisted.
I want to create an s390x ISO fixture for testing in coreos-installer CI
since Ignition embedding works differently than other arches.
@jlebon
Copy link
Member Author

jlebon commented Mar 7, 2023

Rebased and review comments addressed!

@jlebon
Copy link
Member Author

jlebon commented Mar 13, 2023

Before merging this, we need to make sure coreos/coreos-installer#1070 (in coreos-installer v0.17.0) lands in FCOS stable and RHCOS 4.13-9.2.

@bgilbert
Copy link
Contributor

That's only true for enabling tests. If desired, we could split the tests out into a followup PR.

@jlebon
Copy link
Member Author

jlebon commented Mar 13, 2023

Hmm actually, it's not even true for that. kola uses the coreos-installer from cosa to embed the Ignition configs into the ISO. I've just tagged the v0.17.0 into the continuous Koji tag and started a force-rebuild of cosa, so I think this is ready to go!

@jlebon jlebon marked this pull request as ready for review March 13, 2023 20:46
@jlebon jlebon merged commit 30278b0 into coreos:main Mar 14, 2023
@jacobemery
Copy link

Woo! Thanks @jlebon

@jlebon jlebon deleted the pr/s390x-iso branch April 22, 2023 23:35
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.

None yet

6 participants