Bug 244649 - kdump init scripts don't work if user supplies KDUMP_COMMANDLINE
Summary: kdump init scripts don't work if user supplies KDUMP_COMMANDLINE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools
Version: 5.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Neil Horman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-18 11:43 UTC by Stephen Tweedie
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2007-0548
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 18:03:08 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0548 0 normal SHIPPED_LIVE kexec-tools bug fix and enhancement update 2007-10-30 16:07:22 UTC

Description Stephen Tweedie 2007-06-18 11:43:33 UTC
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()
{

	if [ -z "$KDUMP_COMMANDLINE" ]
	then
		KDUMP_COMMANDLINE=`cat /proc/cmdline`
	fi

	MEM_RESERVED=`echo $KDUMP_COMMANDLINE | grep
"crashkernel=[0-9]\+[MmKkGg]@[0-9]\+[MmGgKk]"`
	if [ -z "$MEM_RESERVED" ]
	then
		$LOGGER "No crashkernel parameter specified for running kernel"
		return 1
	fi

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:
100%

Steps to Reproduce:
1. Set a KDUMP_COMMANDLINE
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 13:50:57 UTC
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 Program Management 2007-06-18 13:54:04 UTC
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
release.

Comment 4 Neil Horman 2007-06-19 16:04:34 UTC
fixed in -178.el5.  Thanks!

Comment 8 errata-xmlrpc 2007-11-07 18:03:08 UTC
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.

http://rhn.redhat.com/errata/RHBA-2007-0548.html



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