Skip to content

rhel8: move eapWorkload() into a regular package list#1660

Merged
supakeen merged 3 commits intoosbuild:mainfrom
mvo5:drop-rhel8-workload
Jul 17, 2025
Merged

rhel8: move eapWorkload() into a regular package list#1660
supakeen merged 3 commits intoosbuild:mainfrom
mvo5:drop-rhel8-workload

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Jul 14, 2025

This commit removes the rhel8 workload for azureEap7 and
make it a normal part of the package to install. This
changes the way we resolve, i.e. workloads are resolved
in a separate transaction. But it should not matter in
practise but it shows up in the manifest diff.


internal: drop unused workload examples

The workload concept got introduced around rhel8 but its not
used outside a single image type (azureEap7 on rhel8). So
drop the unused examples for workloads that are not used.
If we need them again we can always pull them from the
git history.

mvo5 added 2 commits July 14, 2025 09:43
This commit removes the rhel8 workload for azureEap7 and
make it a normal part of the package to install. This
changes the way we resolve, i.e. workloads are resolved
in a separate transaction. But it should not matter in
practise but it shows up in the manifest diff.
The workload concept got introduced around rhel8 but its not
used outside a single image type (azureEap7 on rhel8). So
drop the unused examples for workloads that are not used.
If we need them again we can always pull them from the
git history.
@mvo5 mvo5 requested a review from thozza July 14, 2025 07:55
@mvo5 mvo5 requested a review from a team as a code owner July 14, 2025 07:55
@mvo5 mvo5 requested review from achilleas-k and supakeen July 14, 2025 07:55
@thozza
Copy link
Member

thozza commented Jul 15, 2025

Thanks.

I just wanted to comment on the depsolving part. Others can correct me if I'm wrong. The base package set is depsolved with weak dependencies installed by default, while workload packages (effectivelly the same as the "user-requested" packages) are depsolved with weak dependencies not installed by default. The reason is mostly that users don't have any way to exclude packages in the BP (i.e. the weak deps). So by moving the package set from the custom workload to the base package set, we may start installing weak deps that were not installed before. Therefore the excluded packages list in the base package set may need to be adjusted, so that the package set in the depsolved manifest is the same as before. IOW, the depsolved manifest should not change with this change.

Note that I didn't review the code, I just wanted to provide more context on what should be done and how depsolving affects this change.

@achilleas-k
Copy link
Member

IOW, the depsolved manifest should not change with this change.

I agree. It should be possible to add excludes here so that the real manifest doesn't change. We will still see a change in the mock manifest (because the excludes are listed as packages), but let's make sure to verify the depsolved one.

@mvo5 mvo5 force-pushed the drop-rhel8-workload branch from f2802dc to cf43894 Compare July 16, 2025 15:13
@mvo5
Copy link
Contributor Author

mvo5 commented Jul 16, 2025

Thanks for the extra information! I excluded a bunch of packages now and the package list is now identical (and updated the commit message to explain a bit what happend).

@mvo5 mvo5 force-pushed the drop-rhel8-workload branch 2 times, most recently from 7206e75 to 7bb499d Compare July 16, 2025 15:30
achilleas-k
achilleas-k previously approved these changes Jul 16, 2025
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

Great work with the excludes. Thank you!

LGTM

- "rhui-azure-rhel8"
exclude:
- "firewalld"
# eapWorkload()
Copy link
Member

Choose a reason for hiding this comment

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

If we ever drop the concept of the workload, this comment wont make sense. Maybe just # packages for EAP is clearer.

@@ -1 +1 @@
0ff31f6862f4a0576820c15e843214ff68e77708
a4dc4d950c4e6adf6e046004e603172e2f5ab37f
Copy link
Member

Choose a reason for hiding this comment

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

What changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The most important change is:

-        "sha256:981c6e4afa2c6d0f1b450638f3204f63c1c2197e7d581988223fccb1814ab04c": {
-          "url": "https://example.com/repo/packages/os:transaction-2-repos:baseos+appstream+rhui-azure+jbeap7"

i.e. the extra transaction with the workload is gone. Now of course a bunch of extra exclude: are also part of the (fake) manifest change

@achilleas-k
Copy link
Member

Testing manifest generation locally, I'm getting

Encountered 1 errors:
  0: [rhel_8.6-x86_64-azure_eap7_rhui-empty_rhel.json] depsolve failed: error depsolving: running osbuild-depsolve-dnf failed:
DNF error occurred: DepsolveError: There was a problem depsolving dracut-config-generic, grub2-pc, dracut-config-generic, efibootmgr, grub2-efi-x64, shim-x64, kernel, lvm2, xfsprogs, dosfstools, @Server, NetworkManager, NetworkManager-cloud-setup, WALinuxAgent, bzip2, cloud-init, cloud-utils-growpart, cryptsetup-reencrypt, dracut-config-generic, dracut-norescue, eap7-artemis-native-wildfly, eap7-wildfly, efibootmgr, gdisk, hyperv-daemons, insights-client, java-1.8.0-openjdk, java-1.8.0-openjdk-devel, kernel, kernel-core, kernel-modules, langpacks-en, lvm2, nvme-cli, patch, rhui-azure-rhel8, rng-tools, selinux-policy-targeted, uuid, yum-utils, selinux-policy-targeted:
 Problem 1: package java-1.8.0-openjdk-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires libjpeg.so.62()(64bit), but none of the providers can be installed
  - package java-1.8.0-openjdk-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires libjpeg.so.62(LIBJPEG_6.2)(64bit), but none of the providers can be installed
  - conflicting requests
  - package libjpeg-turbo-1.5.3-12.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a is filtered out by exclude filtering
 Problem 2: package java-1.8.0-openjdk-devel-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires java-1.8.0-openjdk(x86-64) = 1:1.8.0.322.b06-11.el8, but none of the providers can be installed
  - package java-1.8.0-openjdk-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires libjpeg.so.62()(64bit), but none of the providers can be installed
  - package java-1.8.0-openjdk-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires libjpeg.so.62(LIBJPEG_6.2)(64bit), but none of the providers can be installed
  - conflicting requests
  - package libjpeg-turbo-1.5.3-12.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a is filtered out by exclude filtering
 Problem 3: package eap7-wildfly-java-jdk8-7.4.18-1.GA_redhat_00001.1.el8eap.noarch from 3d84fef977aad537b839734a3544071f55bcc03685cf5aa53a93122862aeb7f1 requires java-1.8.0 >= 1:1.8, but none of the providers can be installed
  - package eap7-wildfly-7.4.18-1.GA_redhat_00001.1.el8eap.noarch from 3d84fef977aad537b839734a3544071f55bcc03685cf5aa53a93122862aeb7f1 requires eap7-wildfly-java = 7.4.18-1.GA_redhat_00001.1.el8eap, but none of the providers can be installed
  - package java-1.8.0-openjdk-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires libjpeg.so.62()(64bit), but none of the providers can be installed
  - package java-1.8.0-openjdk-1:1.8.0.322.b06-11.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a requires libjpeg.so.62(LIBJPEG_6.2)(64bit), but none of the providers can be installed
  - conflicting requests
  - package libjpeg-turbo-1.5.3-12.el8.x86_64 from 35dcf46d6a9827a88590b2158da37298e7cf7a0377d24ce5b3e5c3e81258d88a is filtered out by exclude filtering

Which I'm also seeing in the gitlab tests.

@mvo5
Copy link
Contributor Author

mvo5 commented Jul 16, 2025

Testing manifest generation locally, I'm getting
[..]
Which I'm also seeing in the gitlab tests.

Sorry for that, in my ignorance I only tested 8.10 locally and overlooked that 8.8 and 8.6 also need to be done, I am on it. but having some strange problems with that the exclude for python3-webencodings and python3-html5lib is not honored/working on rhel-8.6,rhel-8.8. Debugging now why.

For 8.6 and 8.8 slightly adjust excludes were needed, this should be all good now, I tested manually 8.6, 8.8, 8.10 and ran: gen-manifests -distros rhel-8.* -arches x86_64 -types azure-eap7-rhui and only 8.{6,8,10} were generated.

@mvo5 mvo5 force-pushed the drop-rhel8-workload branch from 7bb499d to 12aa401 Compare July 16, 2025 19:13
@mvo5 mvo5 marked this pull request as draft July 16, 2025 19:20
@mvo5 mvo5 force-pushed the drop-rhel8-workload branch from 12aa401 to 695a9b0 Compare July 16, 2025 19:29
@mvo5 mvo5 marked this pull request as ready for review July 16, 2025 19:29
By removing the eapWorload() from azure-eap7-rhui we can remove
the special cases from the rhel8 tests. When eapWorload() was
a custom workload no blueprint customizations where supported.

With the simplification in the previous commit they now are
supported. Technically this is a behavior change but it
will not break backward compatibility, just allow more now.

Note that the difference between the "workload" handling and
package sets is that workloads will not install weak dependencies
but package sets do. So this commit also excludes a bunch of
packages that are weak dependencies of the eapWorkload(). With
these excludes the resulting package list is identical between
before and after in my testing. Validated with:
```
$ gen-manifests -distros rhel-8.* -arches x86_64 -types azure-eap7-rhui
$ diff -u \
   ./test/data/manifests/rhel_8.<ver>-x86_64-azure_eap7_rhui-empty_rhel.json \
   ./test/data/manifests/rhel_8.<ver>-x86_64-azure_eap7_rhui-empty_rhel.json.good
```
@mvo5 mvo5 force-pushed the drop-rhel8-workload branch from 695a9b0 to a7362a6 Compare July 16, 2025 19:44
@mvo5 mvo5 requested a review from achilleas-k July 16, 2025 19:44
@supakeen supakeen added this pull request to the merge queue Jul 17, 2025
Merged via the queue into osbuild:main with commit 807e95a Jul 17, 2025
21 checks passed
mvo5 added a commit to mvo5/images that referenced this pull request Jul 24, 2025
We no longer support image types that set a workload directly,
see osbuild#1660 and also there
is no concept (intentionally) for a workload to be YAML.

With this we can drop `workload` from the generic distro
`imageType` as this is always unset and we always create
a `workload.Custom{}` based on the blueprint config.

As a further step we might consider removing the `workload`
package entirely and just replace it with `ImageConfig`
(this ties into the idea of Achilleas to unify most configs
into inheritable ImageConfigs). But that is for later :)
github-merge-queue bot pushed a commit that referenced this pull request Jul 24, 2025
We no longer support image types that set a workload directly,
see #1660 and also there
is no concept (intentionally) for a workload to be YAML.

With this we can drop `workload` from the generic distro
`imageType` as this is always unset and we always create
a `workload.Custom{}` based on the blueprint config.

As a further step we might consider removing the `workload`
package entirely and just replace it with `ImageConfig`
(this ties into the idea of Achilleas to unify most configs
into inheritable ImageConfigs). But that is for later :)
mvo5 added a commit to mvo5/images that referenced this pull request Jul 25, 2025
We no longer support image types that set a workload directly,
see osbuild#1660 and also there
is no concept (intentionally) for a workload to be YAML.

With this we can drop `workload` from the generic distro
`imageType` as this is always unset and we always create
a `workload.Custom{}` based on the blueprint config.

As a further step we might consider removing the `workload`
package entirely and just replace it with `ImageConfig`
(this ties into the idea of Achilleas to unify most configs
into inheritable ImageConfigs). But that is for later :)
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