RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2006692 - Please remove deprecated option "crashkernel=auto" from rhel9 distros in image builder
Summary: Please remove deprecated option "crashkernel=auto" from rhel9 distros in imag...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: osbuild-composer
Version: 9.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomáš Hozza
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On: 2024976
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-22 08:07 UTC by Frank Liang
Modified: 2022-05-17 13:37 UTC (History)
11 users (show)

Fixed In Version: osbuild-composer-44-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 13:29:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github osbuild osbuild-composer issues 1819 0 None open [RHEL-9] Remove deprecated option `crashkernel=auto` from all image definitions 2021-09-22 09:35:39 UTC
Github osbuild osbuild-composer pull 2262 0 None open RHEL-90: Remove deprecated `crashkernel=auto` option 2022-02-04 16:13:13 UTC
Red Hat Issue Tracker RHELPLAN-97888 0 None Waiting on Customer [bug] ロール「heat_stack_owner」の要否について 2022-05-10 01:25:16 UTC
Red Hat Product Errata RHBA-2022:2522 0 None None None 2022-05-17 13:30:08 UTC

Description Frank Liang 2021-09-22 08:07:14 UTC
Description of problem:
From bz1942398, this option was dropped from rhel9, so please remove it when generating rhel9 images.
[root@dev209 test]# guestfish -a rhel-guest-image-9.0-20210921.6.x86_64.qcow2 -i sh 'cat /boot/grub2/grubenv'
# GRUB Environment Block
kernelopts=root=UUID=95328833-60be-4de1-af21-8ac2d7dc6a37 console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto
saved_entry=ffffffffffffffffffffffffffffffff-5.14.0-1.2.1.el9.x86_64

RHEL Version:
RHEL-9.0(5.14.0-1.2.1.el9)

How reproducible:
100%

Steps to Reproduce:
1. Check grubenv cfg in rhel9 images

Actual results:
crashkernel=auto applied

Expected results:
no crashkernel=auto required any more

Additional info:
- N/A

Comment 1 Tomáš Hozza 2021-09-22 09:25:09 UTC
Created upstream issue https://github.com/osbuild/osbuild-composer/issues/1819

Comment 2 Frank Liang 2021-09-26 09:13:39 UTC
Hi Tomas,

To keep consistent with the previous images with kdump enabled, I guess you need to specify crashkernel after removed 'crashkernel=auto'.

I am asking kairui for more suggestions.

Hi Kairui,

Do you have any comments in specifying it? Because I found it was not always added when new kernel installed.

eg."crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M" on x86_64, how about other platforms?

Comment 3 Kairui Song 2021-10-26 10:02:41 UTC
Hi,

Starting from RHEL9, crashkernel will have a default value included in the kernel package, on a installed system there will be a file available as /lib/modules/$(uname -r)/crashkernel.default which contains the default crashkernel value for that specified kernel version. System installer should set crashkernel value based on this file.

You can check bz1974638 and bz1942398 for more info.

Comment 5 Tomáš Hozza 2021-11-02 11:59:12 UTC
Hi Frank.

Please correct me if I'm wrong. After going through the bugs linked in comment #3, it seems to me that Image builder should simply append the content of "${rootfs}/lib/modules/${kernelver}/crashkernel.default" provided by the installed kernel package to the kernel command line options used by the image. Is that correct?

Comment 6 Frank Liang 2021-11-02 12:28:03 UTC
(In reply to Tomáš Hozza from comment #5)
> Hi Frank.
> 
> Please correct me if I'm wrong. After going through the bugs linked in
> comment #3, it seems to me that Image builder should simply append the
> content of "${rootfs}/lib/modules/${kernelver}/crashkernel.default" provided
> by the installed kernel package to the kernel command line options used by
> the image. Is that correct?
Yes, I think so.

Here are examples of my systems:
# cat /lib/modules/5.14.0-8.el9.x86_64/crashkernel.default 
crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M
# cat /lib/modules/5.14.0-11.el9.aarch64/crashkernel.default 
crashkernel=2G-:448M

Comment 7 Tomáš Hozza 2021-11-12 14:08:05 UTC
There have been multiple issued identified with this change, which will require changes to osbuild as well as image definitions in osbuild-composer. More information is in the upstream issue https://github.com/osbuild/osbuild-composer/issues/1819#issuecomment-966199997

Comment 9 Dave Young 2022-01-13 05:44:35 UTC
There is a new change in RHEL9.0GA in bug https://bugzilla.redhat.com/show_bug.cgi?id=1895258, the /lib/modules/.../crashkernel.default has been dropped as well,  all have been moved to kexec-tools. There is a kdumpctl option to get the correct default values.

Coiby, can you add more details here about how to get the proper value for os-builder?

Comment 10 Coiby 2022-01-14 01:51:58 UTC
Hi Tomáš,

kexec-tools now would set up kernel crashkernel for osbuild in kernel hook [1] as resolved in Bug 2024976. So now osbuild can simply drop crashkernel=auto and there is no need for osbuild to retrieve the default crashkernel value itself.
    
[1] https://src.fedoraproject.org/rpms/kexec-tools/c/ddd428a1d0d72bee2a8459b1a81541bcd0676873?branch=rawhide

Comment 11 Tomáš Hozza 2022-02-04 16:10:15 UTC
In the interest of time I went ahead and submitted a change in upstream - https://github.com/osbuild/osbuild-composer/pull/2262

Once Bug #2024976 is resolved, the appropriate crashkernel value will be set when RHEL-9.0 image is built.

Comment 12 Tomáš Hozza 2022-02-04 16:13:13 UTC
Note for QE:

The step to verify this change are:
- Before Bug #2024976 is resolved, check that RHEL EC2 and guest image do not have 'crashkernel=auto' on the kernel command line. In fact there won't be any 'crashkernel' option set.
- After Bug #2024976 is resolved, check that RHEL EC2 and guest image do not have 'crashkernel=auto' on the kernel command line. The 'crashkernel' option will be set to the appropriate value by kexec-tools package.

Comment 13 Jakub Rusz 2022-02-04 16:43:17 UTC
This is covered by image-tests.sh so fairly easy to verify for QE.

Comment 14 Frank Liang 2022-03-01 07:46:42 UTC
Uploaded the latest RHEL-9.0-20220227.3(rhel-ec2-9.0-20220227.3.x86_64.raw) to ec2 and crashkernel is set correctly.
# cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt3)/vmlinuz-5.14.0-69.el9.x86_64 root=UUID=da88f4cb-fcdd-4f87-9eb7-40155e2c75bc console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M

Comment 16 Ondřej Budai 2022-03-01 12:23:30 UTC
Fixed by osbuild-composer 44.

Comment 23 errata-xmlrpc 2022-05-17 13:29:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: osbuild-composer), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2522


Note You need to log in before you can comment on or make changes to this bug.