Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-59400

As an osbuild-composer user, I would like to use the previous kernel version

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.4
    • osbuild-composer
    • None
    • No
    • Important
    • rhel-sst-image-builder
    • ssg_front_door
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • All
    • None

      What were you trying to do that didn't work?

      While composing a standard RHEL image, the latest kernel is always installed, even when the previous version was explicitly mentioned in the blueprint. The documentation does not speak about such a limitation. The problem even leads to an error while composing an edge-commit during `rpm-ostree compose postprocess` by the org.osbuild.ostree.preptree stage. Indeed both kernels are installed in this context (whereas the depsolve looks good), and rpm-ostree fails due to this.

      What is the impact of this issue to you?

      Cannot get the expected behaviour. Customer request was:

      "I'm trying to debug an issue with the latest kernel and want to go back a patch level to test."

      Please provide the package NVR for which the bug is seen:

      osbuild-composer-101-1.el9.x86_64

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Create a blueprint with the "kernel" package and the desired version (not the latest).
      2. Try to compose this blueprint.
      3. Observe that on a standard RHEL img, the latest kernel is installed anyway (not the desired behaviour), and on an edge commit, both kernels are installed (the desired and the latest), leading to an error.

      Note: specifying the version in the [customizations.kernel] name does not work either.

      Actual results

      # composer-cli blueprints depsolve edge-kernel | grep kernel
      blueprint: edge-kernel v0.0.2
          kernel-5.14.0-427.33.1.el9_4.x86_64
          kernel-core-5.14.0-427.33.1.el9_4.x86_64
          kernel-modules-5.14.0-427.33.1.el9_4.x86_64
          kernel-modules-core-5.14.0-427.33.1.el9_4.x86_64
          kernel-srpm-macros-1.0-13.el9.noarch 
      
      # composer-cli compose log 944b0e2a-4f85-46d6-a8cd-96b52f0a1c9d| grep kernel
      kernel-srpm-macros-1.0-13.el9.noarch
      kernel-modules-core-5.14.0-427.33.1.el9_4.x86_64
      kernel-core-5.14.0-427.33.1.el9_4.x86_64
      kernel-modules-core-5.14.0-427.35.1.el9_4.x86_64
      kernel-core-5.14.0-427.35.1.el9_4.x86_64
      kernel-modules-5.14.0-427.35.1.el9_4.x86_64
      kernel-modules-5.14.0-427.33.1.el9_4.x86_64
      kernel-5.14.0-427.33.1.el9_4.x86_64
      kernel-5.14.0-427.35.1.el9_4.x86_64
      
      Stage: org.osbuild.ostree.preptree
      Output:
       :
      Preparing kernel
      error: Finalizing rootfs: During kernel processing: Multiple vmlinuz- in usr/lib/ostree-boot, occurrences 'usr/lib/ostree-boot/vmlinuz-5.14.0-427.33.1.el9_4.x86_64' and 'usr/lib/ostree-boot/vmlinuz-5.14.0-427.35.1.el9_4.x86_64'
      Traceback (most recent call last):
        File "/run/osbuild/bin/org.osbuild.ostree.preptree", line 176, in <module>
          r = main(args["tree"], args["options"])
        File "/run/osbuild/bin/org.osbuild.ostree.preptree", line 169, in main
          subprocess.run(["rpm-ostree", "compose", "postprocess",
        File "/usr/lib64/python3.9/subprocess.py", line 528, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['rpm-ostree', 'compose', 'postprocess', '/run/osbuild/tree', '/tmp/tmpjh2zneuq.json']' returned non-zero exit status 1.  

      I've raised this issue as high, as it is legitimate and we have no workaround.

              osbuilders Osbuilders Bot Account
              rhn-support-cbesson Christophe Besson
              Osbuilders Bot Account Osbuilders Bot Account
              Release Test Team Release Test Team
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: