Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1892558

Summary: kdump: provide a library API to export suggested crashkernel reservation values
Product: Red Hat Enterprise Linux 8 Reporter: Pingfan Liu <piliu>
Component: kexec-toolsAssignee: Pingfan Liu <piliu>
Status: CLOSED ERRATA QA Contact: xiaoying yan <yiyan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.4CC: bugproxy, cye, gduarte, ruyang, xiawu
Target Milestone: rcKeywords: Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: kexec-tools-2.0.20-50.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1952342 1974552 (view as bug list) Environment:
Last Closed: 2021-11-09 19:40:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1674330, 1725784, 1916117, 1952342, 1966881, 1974552    

Description Pingfan Liu 2020-10-29 07:42:49 UTC
Description of problem:

FFDC relies on kdump library to get some info. Currently, it is about suggested memory size.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 xiaoying yan 2021-05-25 10:49:34 UTC
Tested on RHEL-8.5.0-20210524.d.0+kexec-tools-2.0.20-49.el8 on all arch, the return values are the same as the expect values,all of them passed.

Components:
RHEL-8.5.0-20210524.d.0
kernel-4.18.0-305.7.el8.kpq1
kexec-tools-2.0.20-49.el8
crash-7.3.0-2.el8

test steps:
# rpm -q kexec-tools
kexec-tools-2.0.20-49.el8.ppc64le
# . /usr/lib/kdump/kdump-lib.sh
# kdump_get_arch_recommend_size    <== it will return the value.
        

1. x86_64 - total memory is 32G
a. crashkernel=auto,the return value is 192M  -- PASS
b. crashkernel=256M,the return value is 192M  -- PASS
c. mem=800M,the return value is 0M            -- PASS

2. aarch64 - total memory is 5575M
a. crashkernel=auto,the return value is 448M  -- PASS
b. crashkernel=256M,the return value is 448M  -- PASS
c. mem=1024M,the return value is 0M           -- PASS

3. s390x - total memory is 8G
a. crashkernel=auto,the return value is 192M  -- PASS
b. crashkernel=256M,the return value is 192M  -- PASS
c. mem=900M,the return value is 0M            -- PASS

4. ppc64le - kdump - total memory is 32G
a. crashkernel=auto,the return value is 1G    -- PASS
b. crashkernel=256M,the return value is 1G    -- PASS
c. mem=1024M,the return value is 0M           -- PASS

5. ppc64le - kdump - total memory is 32G
a. crashkernel=auto,the return value is 1G    -- PASS
b. crashkernel=256M,the return value is 1G    -- PASS
c. mem=4096M,the return value is 768M         -- PASS
d. mem=2048M,the return value is 0M           -- PASS

beaker job:
https://beaker.engineering.redhat.com/jobs/5406150 (x86_64/aarch64/s390x)
https://beaker.engineering.redhat.com/jobs/5406687 (ppc64le - kdump)
https://beaker.engineering.redhat.com/jobs/5406639 (ppc64le - fadump)

Comment 9 Pingfan Liu 2021-05-27 04:06:16 UTC
comment#9 is tested against an official build https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1612548

But I made another rapid successive building at that day, and finally pick up kexec-tools-2.0.20-50.el8 into errata.

The difference between the two releases is minor as the following commits
b2dccde2 Release-2.0.20-50
2c2ae3b9 rd.route should use the name from kdump_setup_ifname
f97d3cac get kdump ifname once in kdump_install_netdev
a3ef9148 Release-2.0.20-49
11608030 kdump-lib.sh: fix the case if no enough total RAM for kdump  in get_recommend_size()
557a2c2f Release-2.0.20-48


2c2ae3b9 rd.route should use the name from kdump_setup_ifname and f97d3cac get kdump ifname once in kdump_install_netdev
only touch dracut-module-setup.sh, not kdump-lib.sh.

Comment 10 Pingfan Liu 2021-05-27 04:09:49 UTC
As comment#9, I can not pick up kexec-tools-2.0.20-49 in errata, which will deprecate kexec-tools-2.0.20-50.

But I think that changing the fix version from kexec-tools-2.0.20-49 to -50 is safe.

I will be more careful to correct the fix version in time, which is automatically filled by gating engine now.

Thanks

Comment 12 Emma Wu 2021-06-22 03:35:07 UTC
Hi Hanns,

Based on QE tests, the . /usr/lib/kdump/kdump-lib.sh works as expected (comment-6).
Can I know what failed IBM tests ? (Verified: FailedQA Tested)

Thanks,
Emma

Comment 13 Hanns-Joachim Uhl 2021-06-22 07:54:47 UTC
(In reply to Emma Wu from comment #12)
> Hi Hanns,
> 
> Based on QE tests, the . /usr/lib/kdump/kdump-lib.sh works as expected
> (comment-6).
> Can I know what failed IBM tests ? (Verified: FailedQA Tested)
> 
> Thanks,
> Emma
.
Hello Gustavo,
please check with the IBM team about the status of this bugzilla ...
Thanks in advance for your support.

Comment 14 IBM Bug Proxy 2021-06-24 06:20:44 UTC
------- Comment From hbathini.com 2021-06-24 02:12 EDT-------
kdumpctl estimate works as intended except for the below warning
when KDUMP_KERNELVER is set in /etc/sysconfig/kdump file:

/lib/kdump/kdump-lib.sh: line 692: [: missing `]'

The patch to fix it is already posted at:

https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/thread/T37P3VL6B2RZ7JFWN6NA6L4NA4XRC56W/
("[PATCH] kdump-lib.sh: fix a warning in prepare_kdump_bootinfo()")

------- Comment From hbathini.com 2021-06-24 02:13 EDT-------
Verification successful

Comment 15 xiaoying yan 2021-06-24 07:21:12 UTC
(In reply to IBM Bug Proxy from comment #14)
> ------- Comment From hbathini.com 2021-06-24 02:12 EDT-------
> kdumpctl estimate works as intended except for the below warning
> when KDUMP_KERNELVER is set in /etc/sysconfig/kdump file:
> 
> /lib/kdump/kdump-lib.sh: line 692: [: missing `]'
> 
> The patch to fix it is already posted at:
> 
> https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/
> thread/T37P3VL6B2RZ7JFWN6NA6L4NA4XRC56W/

This issue was tracked in bug 1966881- RHEL8.4 - kdump service restart throws a bash script error when KDUMP_KERNELVER is set .

Comment 17 errata-xmlrpc 2021-11-09 19:40:13 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 (Low: kexec-tools security, bug fix, and enhancement update), 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/RHSA-2021:4404