Bug 436982

Summary: kdump_pre hook produces errors
Product: Red Hat Enterprise Linux 5 Reporter: Dan Duval <dan.duval>
Component: kexec-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: low    
Version: 5.2CC: charlotte.richardson, qcai, smcgrath
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-04 11:37:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to /sbin/mkdumprd that appears to correct this bug none

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. ***