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

[RHEL 9.4] disable dracut for ostree based systems on rpm installation (RHEL-63058) #989

Merged

Conversation

achilleas-k
Copy link
Member

Backport of #895 to RHEL 9.4 for https://issues.redhat.com/browse/RHEL-63058.

@achilleas-k achilleas-k changed the title Backport/9.4/ostree disable dracut (RHEL-63058) [RHEL 9.4] disable dracut for ostree based systems on rpm installation (RHEL-63058) Oct 18, 2024
ondrejbudai
ondrejbudai previously approved these changes Oct 18, 2024
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

Looks good! :)

@achilleas-k achilleas-k force-pushed the backport/9.4/ostree-disable-dracut branch 11 times, most recently from 0c39a86 to cda5a59 Compare October 18, 2024 15:39
supakeen
supakeen previously approved these changes Oct 18, 2024
@achilleas-k
Copy link
Member Author

Testing changes still need a bit of work. Gotta trim the dependencies (btrfs etc), add compile flags to make them unneeded, and remove the aws-cli stuff in the gitlab pipelines. It's ok to ignore build result caching for this branch.

@achilleas-k achilleas-k force-pushed the backport/9.4/ostree-disable-dracut branch 7 times, most recently from fc39db8 to 64135d3 Compare October 21, 2024 12:50
achilleas-k and others added 5 commits October 21, 2024 15:19
Updating the test configs and test scripts is necessary to be compatible
with recent changes in the way we handle testing ostree-based images.
Since a58470c (v0.65.0), we stopped
using the gitlab registry to host ostree containers.

This commit also removes all repository configurations except RHEL 9.4
and regenerates the gitlab test matrix so that we only focus on testing
that distribution version.

The unit tests on Fedora 40 have been removed.  Unit tests will only run
on CentOS Stream 9 with an osbuild version matching the version used in
v0.40.0.

The config-map has been reduced to only include configurations valid for
RHEL 9.4.

The cmd/boot-aws command is also pulled from main because it will be
called with new flags and features from the test scripts in ./test.
Installing the `minimal-environment` RPM group implies the installation
of `dracut-config-rescue` which makes `org.osbuild.ostree.preptree` to
fail because `rpm-ostree` detects multiple kernels within the tree
(the usual one and the rescue one). Disabling dracut during the rpm
installation prevents the rescue kernel/initrd to be generated and
makes `rpm-ostree` to finish the compose succesfully.

`rpm-ostree` runs dracut on his own during the compose so this doesn't
seem to affect the final result.

Resolves: osbuild#624
The @minimal-environment rpm group includes 'dracut-config-rescue'
which, by default, will create a rescue kernel configuration.  With
ostree-based images, this will fail, since rpm-ostree requires that only
one kernel exists in an image.  We now disable dracut when installing
packages for ostree commits, so this should no longer be a problem.

Adding a configuration pair to test that the image builds and boots.
The configs include:
1. An edge-container built with the @minimal-environment rpm group,
   which will pull in the dracut-config-rescue package.  This is built
   for all RHEL 9 versions.
2. An edge-ami built using the new edge container as input.  The config
   includes a user so that the image can be booted in CI.
@achilleas-k achilleas-k force-pushed the backport/9.4/ostree-disable-dracut branch from 64135d3 to 5f9867f Compare October 21, 2024 13:19
- Disable downloading of build cache.
- Disable uploading of results to cache.
- Add build tags to exclude the btrfs graphdriver for the container
  dependencies.
- Remove awscli2 and btrfs-progs-devel from the install dependencies
  script (not available on RHEL).
- Remove the check-build-coverage step in gitlab-ci.  It requires
  reading the build cache.
- Disable ostree derivative builds (images and installers), since they
  require the aws cli.
@achilleas-k achilleas-k force-pushed the backport/9.4/ostree-disable-dracut branch from 5f9867f to 73624c1 Compare October 21, 2024 14:35
@achilleas-k
Copy link
Member Author

All green now!

@supakeen supakeen merged commit 649fd21 into osbuild:rhel-9.4.0 Oct 22, 2024
11 checks passed
@achilleas-k achilleas-k deleted the backport/9.4/ostree-disable-dracut branch October 22, 2024 09:23
achilleas-k added a commit to achilleas-k/osbuild-composer that referenced this pull request Oct 22, 2024
ondrejbudai pushed a commit to osbuild/osbuild-composer that referenced this pull request Oct 23, 2024
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