Bug 244649 - kdump init scripts don't work if user supplies KDUMP_COMMANDLINE
kdump init scripts don't work if user supplies KDUMP_COMMANDLINE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Neil Horman
Depends On:
  Show dependency treegraph
Reported: 2007-06-18 07:43 EDT by Stephen Tweedie
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0548
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 13:03:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to scan /proc/cmdline only for crashkernel parameter (648 bytes, patch)
2007-06-18 09:50 EDT, Neil Horman
no flags Details | Diff

  None (edit)
Description Stephen Tweedie 2007-06-18 07:43:33 EDT
Description of problem:
If the user supplies a KDUMP_COMMANDLINE in /etc/sysconfig/kdump with no
"crashkernel=" option, then "service kdump start" will fail

The KDUMP_COMMANDLINE is supposed to be passed only to the kdump kernel, it does
not reflect the running primary boot kernel.  Only the primary kernel needs
"crashkernel=" set.  And yet the /etc/rc.d/init.d/kdump script checks the kdump
options, NOT the boot kernel options, for "crashkernel=" if this option is set.

The problem is in

function load_kdump()

		KDUMP_COMMANDLINE=`cat /proc/cmdline`

	if [ -z "$MEM_RESERVED" ]
		$LOGGER "No crashkernel parameter specified for running kernel"
		return 1

which selects the KDUMP_COMMANDLINE options before checking for crashkernel=.

Version-Release number of selected component (if applicable):
kexec-tools-1.101-177.el5, from CVS.

How reproducible:

Steps to Reproduce:
2. "service kdump start" or reboot.
Actual results:
'No crashkernel parameter specified for running kernel'

Expected results:
kdump should start

Additional info:
It is important to allow a KDUMP_COMMANDLINE with no crashkernel= option on it,
as the command line length for the kdump kernel is quite limited and I already
find that it overflows readily if I supply my usual kernel options on it.
Comment 1 Neil Horman 2007-06-18 09:50:57 EDT
Created attachment 157282 [details]
patch to scan /proc/cmdline only for crashkernel parameter

Yep, thanks for the catch stephen.  This patch should fix it.  I'll check it in
as soon as this gets approved for 5.1
Comment 2 RHEL Product and Program Management 2007-06-18 09:54:04 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 4 Neil Horman 2007-06-19 12:04:34 EDT
fixed in -178.el5.  Thanks!
Comment 8 errata-xmlrpc 2007-11-07 13:03:08 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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