-
Notifications
You must be signed in to change notification settings - Fork 54
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
os: disable dracut for ostree based systems on rpm installation #895
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does what it needs to do; perhaps we could use a (boot) test to ensure that user customized systems that add dracut-config-rescue
build after this.
@achilleas-k How do you feel having the check here, I could also see it living inside the RPM stage wrapper.
The edge AMI builds are boot tested in gitlab CI, so the base case here has already passed. Lines 89 to 93 in 0a9d89e
using the edge-container image type with the empty config as its base:images/test/configs/edge-ostree-pull-user.json Lines 16 to 19 in 0a9d89e
In the CI run for this PR, the edge-container was built with dracut disabled: https://gitlab.com/redhat/services/products/image-builder/ci/images/-/jobs/7725683968#L1903 So we're covered for the base case in terms of testing, which is nice. But since this PR was made to address a specific use case, we could add an extra test config that installs |
Added new build configs for this scenario. |
6dd10d1
to
1a7ba70
Compare
Messed something up with the configs. Fixing. |
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
1a7ba70
to
bdeca68
Compare
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.
bdeca68
to
e5dd3cb
Compare
The podman stop command was passing the list of container IDs as a single argument with spaces in it, which is wrong. The arguments need to be separate, so we should expand the list of IDs instead. This was never an issue because we never had multiple containers in a distro's ostree build config until now.
Installing the
minimal-environment
RPM group implies the installationof
dracut-config-rescue
which makesorg.osbuild.ostree.preptree
tofail 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'tseem to affect the final result.
Resolves: #624