Bug 592312

Summary: kdump's dumprd not rebuilding when appropriate.
Product: Red Hat Enterprise Linux 6 Reporter: Dave Maley <dmaley>
Component: kexec-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: branto, cward, ltroan, mfuruta, phan, qcai, richard.johnson, syeghiay, tao, xyang
Target Milestone: betaKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kexec-tools-2.0.0-74 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 459614 Environment:
Last Closed: 2010-07-02 20:52:18 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:
Bug Depends On: 459614    
Bug Blocks: 468087, 600568    
Attachments:
Description Flags
patch none

Description Dave Maley 2010-05-14 14:28:18 UTC
Created attachment 414068 [details]
patch

+++ This bug was initially created as a clone of Bug #459614 +++

Description of problem:
kdump's initrd not rebuilt after updating:
  - kdump_pre/kdump_post scripts
  - any of the extra_modules


Version-Release number of selected component (if applicable):
kexec-tools-2.0.0-69.el6


How reproducible:
100%


Steps to Reproduce:
for any of the above mentioned kdump.conf directives:
1. touch the component
2. restart kdump service
3. check whether the dumprd is rebuilt with the touched component

  
Actual results:
dumprd not rebuilt 


Expected results:
dumprd rebuilt in all above mentioned cases


Additional info:
(testing done on RHEL6.0-20100512.0 rhts build)
------------
w/out patch:
------------
[root@dell-pe2900-03 ~]# service kdump restart
Stopping kdump:[  OK  ]
Detected /etc/kdump.conf or /boot/vmlinuz-2.6.32-25.el6.x86_64 change
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:[  OK  ]
[root@dell-pe2900-03 ~]# grep -v ^# /etc/kdump.conf 

kdump_pre /var/crash/foo.sh

[root@dell-pe2900-03 ~]# touch /var/crash/foo.sh 
[root@dell-pe2900-03 ~]# service kdump restart
Stopping kdump:[  OK  ]
Starting kdump:[  OK  ]
[root@dell-pe2900-03 ~]#

---------
w/ patch:
---------
[root@dell-pe2900-03 ~]# touch /etc/kdump.conf 
[root@dell-pe2900-03 ~]# service kdump restart
Stopping kdump:[  OK  ]
Detected change(s) the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:[  OK  ]
[root@dell-pe2900-03 ~]# grep -v ^# /etc/kdump.conf 

kdump_pre /var/crash/foo.sh

[root@dell-pe2900-03 ~]# touch /var/crash/foo.sh 
[root@dell-pe2900-03 ~]# service kdump restart
Stopping kdump:[  OK  ]
Detected change(s) the following file(s):
  
  /var/crash/foo.sh
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:[  OK  ]
[root@dell-pe2900-03 ~]#

Comment 1 Qian Cai 2010-05-15 00:39:00 UTC
A DUP against bug 585838?

Comment 2 Issue Tracker 2010-05-17 08:04:50 UTC
Event posted on 05-17-2010 05:04pm JST by mfuruta

Hi Engineering,

(In reply to comment #1)
> A DUP against bug 585838?    

Could you please provide test package to verify and check that patch, if
needed?

Thank you in advance.

Best Regards,
Masaki Furuta




This event sent from IssueTracker by mfuruta 
 issue 872373

Comment 3 Neil Horman 2010-05-17 10:41:44 UTC
Just get the latest kexec tools package out of brew:
https://brewweb.devel.redhat.com/index

Comment 4 Dave Maley 2010-05-17 14:20:30 UTC
Yes this is a duplicate of bug 585838.  Apologies for missing that when filing this bug.  I'd suggest closing 585838 as a dup of this bug since we already have a patch, which is the same as added to RHEL5, checked in and ready to go here.

As for the questions raised in:

 https://bugzilla.redhat.com/show_bug.cgi?id=585838#c4

..this is addressed by rebuilding anytime the extra_modules line is non-null.  From bug 459614:

 "I think perhaps the safest thing to do is look to see if extra_modules is
non-null and rebuild if it has anything listed.  Its overkill, but it saves us
having to worry about wierd cases, like if someone has a 3rd parth module that
doesn't update the dep tree or some such."

Comment 5 Neil Horman 2010-05-17 16:08:30 UTC
*** Bug 585838 has been marked as a duplicate of this bug. ***

Comment 6 Neil Horman 2010-05-17 16:48:19 UTC
waiting for Xudon to test

Comment 8 Xudong Yang 2010-05-20 08:54:40 UTC
Both the patch in bug 585838 and the patch in this bug solve the problem successfully.

The test runs on 
RHEL6.0-Snapshot-4
and version-release number of kexec-tools is
kexec-tools-2.0.0-69.el6

1. When file kdump.conf is as follow:

----- kdump.conf -----
ext4 /dev/vg_dellpe180001/lv_root
path /var/crash
kdump_pre /var/crash/scripts/kdump-pre.sh
kdump_post /var/crash/scripts/kdump-post.sh
extra_bins /usr/bin/gcc
extra_modules gfs2
----------------------
 
running 
# service kdump restart
will always rebuild dumprd as addressed in Comment 4.

For patch in this bug, the output looks like this:
...
[root@dell-pe1800-01 init.d]# service kdump restart
Stopping kdump:                                            [  OK  ]
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:                                            [  OK  ]
...

For patch in bug 585838, the output looks like this:
...
[root@dell-pe1800-01 init.d]# service kdump restart
Stopping kdump:                                            [  OK  ]
Detected change(s) the following file(s):
  
  gfs2
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:                                            [  OK  ]
...

2. when file kdump.conf is as follow:

----- kdump.conf -----
ext4 /dev/vg_dellpe180001/lv_root
path /var/crash
kdump_pre /var/crash/scripts/kdump-pre.sh
kdump_post /var/crash/scripts/kdump-post.sh
extra_bins /usr/bin/gcc
----------------------

Running
# service kdump restart
after touching each of the components in line kdump_pre, kdump_post and extra_bins, the output looks like this:(Both patches' output looks the same.)
...
[root@dell-pe1800-01 init.d]# service kdump restart
Stopping kdump:                                            [  OK  ]
Starting kdump:                                            [  OK  ]
[root@dell-pe1800-01 init.d]# touch /var/crash/scripts/kdump-pre.sh 
[root@dell-pe1800-01 init.d]# service kdump restart
Stopping kdump:                                            [  OK  ]
Detected change(s) the following file(s):
  
  /var/crash/scripts/kdump-pre.sh
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:                                            [  OK  ]
[root@dell-pe1800-01 init.d]# touch /var/crash/scripts/kdump-post.sh 
[root@dell-pe1800-01 init.d]# service kdump restart
Stopping kdump:                                            [  OK  ]
Detected change(s) the following file(s):
  
  /var/crash/scripts/kdump-post.sh
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:                                            [  OK  ]
[root@dell-pe1800-01 init.d]# touch /usr/bin/gcc
[root@dell-pe1800-01 init.d]# service kdump restart
Stopping kdump:                                            [  OK  ]
Detected change(s) the following file(s):
  
  /usr/bin/gcc
Rebuilding /boot/initrd-2.6.32-25.el6.x86_64kdump.img
Starting kdump:                                            [  OK  ]
...

Comment 9 Qian Cai 2010-05-23 09:48:18 UTC
NACK. Using the patch in comment #0 on the top of -70.el6 kexec-tools, it re-built kdump initramfs EVERY time no matter the extra_modules has been updated or not using the following kdump.conf for example, 

# cat /etc/kdump.conf
ext4 /dev/mapper/VolGroup-lv_root
core_collector makedumpfile -c -d 31
default shell
extra_modules sym53c8xx

Comment 10 Qian Cai 2010-05-23 13:38:20 UTC
OK. I looked the patch and realized that it was designed to re-built initramfs every time if extra_modules option was present.

Comment 11 Issue Tracker 2010-05-24 00:38:56 UTC
Event posted on 05-24-2010 09:38am JST by mfuruta

Hi engineering,

Sorry for bothering you,but I would like to inform that TAM still waiting
for SEG to provide us test package for NEC, I am so glad if you would let
SEG know appropriate version of kexec-tools to do so, when ready.

Thank you in advance.

Best Regards,
Masaki Furuta


This event sent from IssueTracker by mfuruta 
 issue 872373

Comment 14 Neil Horman 2010-06-04 12:16:55 UTC
no, its in there, as of version 1.26 of kdump.init

Comment 19 releng-rhel@redhat.com 2010-07-02 20:52:18 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.