Bug 436982 - kdump_pre hook produces errors
Summary: kdump_pre hook produces errors
Keywords:
Status: CLOSED DUPLICATE of bug 269761
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools
Version: 5.2
Hardware: x86_64
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Neil Horman
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
: 443802 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-11 14:39 UTC by Dan Duval
Modified: 2009-09-09 05:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-04 11:37:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to /sbin/mkdumprd that appears to correct this bug (2.50 KB, patch)
2008-03-11 14:39 UTC, Dan Duval
no flags Details | Diff

Description Dan Duval 2008-03-11 14:39:20 UTC
Description of problem:

Attempting to specify a kdump_pre hook in /etc/kdump.conf produces the
following error message from mkdumprd:

	/etc/kdump.conf: Unsupported type kdump_pre

This is because, although an entry for kdump_pre has been added to
the case statement starting around line 879 in /sbin/mkdumprd, the
corresponding entry was not added to the case statement near line
1587.  The result is that the latter case statement falls through
to its default, which is to print the above error message and exit.

In addition, having corrected for the above problem, the resulting
init in the dump initrd invokes the wrong kdump_pre script.  They
way it's coded, it always invokes "/bin/<scriptname>", even if
kdump.conf specifies some other executable for the hook.

This latter problem can be fixed by using $KDUMP_PRE instead of
$KDUMP_PRE_INTERNAL in several places in the mkdumprd script.
This makes the pre- code behave just as does the (working) post-
code.

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

# rpm -qa | grep kexec
kexec-tools-1.102pre-10.el5

How reproducible:

Happens every time.

Steps to Reproduce:

1. add a kdump_pre hook to /etc/kdump.conf
2. invoke 'service kdump restart' to cause the dump initrd to be rebuilt
  
Actual results:

	/etc/kdump.conf: Unsupported type kdump_pre

Expected results:

	Successful restart of kdump service.


Additional info:

I've attached a patch to mkdumprd that appears to correct both
problems.

Comment 1 Dan Duval 2008-03-11 14:39:20 UTC
Created attachment 297617 [details]
patch to /sbin/mkdumprd that appears to correct this bug

Comment 2 Neil Horman 2008-03-11 15:10:01 UTC
yeah, that looks reasonable.  Looks like something got munged inthe merge from
5.1 to 5.2 in fact.  Thanks for the catch.  I'll get this in as soon as its approved

Comment 3 Neil Horman 2008-04-04 11:37:16 UTC
closing this as a dup of 269761 (since I'm slipping this fix in against that
bug, which is approved and needs this patch)

*** This bug has been marked as a duplicate of 269761 ***

Comment 4 Neil Horman 2008-04-23 13:58:54 UTC
*** Bug 443802 has been marked as a duplicate of this bug. ***


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