Bug 463878
Summary: | [5.3] mkdumprd Not Robust Enough | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Qian Cai <qcai> | ||||||
Component: | kexec-tools | Assignee: | Neil Horman <nhorman> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Martin Jenner <mjenner> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5.3 | CC: | charlotte.richardson, cward, ltroan, riek, tao | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 600611 (view as bug list) | Environment: | |||||||
Last Closed: | 2009-01-20 20:59:59 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: | |||||||||
Bug Blocks: | 468087 | ||||||||
Attachments: |
|
Description
Qian Cai
2008-09-25 03:29:15 UTC
Actually, the second issue is a regression against RHEL 5.2 introduced by the critical_disks changes. Therefore, previous working Kdump configuration files are not going to work correctly in RHEL 5.3. Created attachment 317719 [details]
patch to properly quote delimit LABELS
you shouldn't ever need to quote delimit something without spaces in the config file. As for the label with spaces, I'm not sure this will fix all the problems, but if you could, please give this patch a test and let me know the results. Thanks!
I am afraid it won't work for me. First test, - config file: ext3 LABEL="KDUMP TEST" - start Kdump: No kdump initial ramdisk found.[WARNING]^M Rebuilding /boot/efi/efi/redhat/initrd-2.6.18-116.el5kdump.img Usage: findfs LABEL=<label>|UUID=<uuid> Starting kdump:[ OK ] - mkdumprd snip: + USING_METHOD=filesystem + echo 'LABEL="KDUMP' 'TEST"' + egrep -q '^(LABEL|UUID)=' ++ findfs 'LABEL="KDUMP' 'TEST"' Usage: findfs LABEL=<label>|UUID=<uuid> + config_val= + handlelvordev - run Sysrq-C: ... Scanning logical volumes Reading all physical volumes. This may take a while... Found volume group "VolGroup00" using metadata type lvm2 Activating logical volumes 2 logical volume(s) in volume group "VolGroup00" now active hwclock: Could not access RTC: No such file or directory Saving to the local filesystem LABEL=KDUMP TEST BusyBox v1.2.0 (2008.01.04-12:33+0000) multi-call binary No help available. BusyBox v1.2.0 (2008.01.04-12:33+0000) multi-call binary No help available. mount: Cannot read /etc/fstab: No such file or directory umount: Couldn't umount /mnt: Invalid argument [: 0: unknown operand Attempting to enter user-space to capture vmcore Creating root device. Checking root filesystem. fsck 1.38 (30-Jun-2005) ... - init from initramfs snip: ... echo Saving to the local filesystem LABEL="KDUMP TEST" DUMPDEV=LABEL="KDUMP TEST" IS_LABEL=`echo $DUMPDEV | grep LABEL` IS_UUID=`echo $DUMPDEV | grep UUID` if [ -n "$IS_LABEL" -o -n "$IS_UUID" ] then DUMPDEV=`findfs $DUMPDEV` fi fsck.ext3 $DUMPDEV mount -t ext3 $DUMPDEV /mnt if [ $? == 0 ] then mkdir -p /mnt//var/crash/127.0.0.1-$DATE VMCORE=/mnt//var/crash/127.0.0.1-$DATE/vmcore export VMCORE monitor_cp_progress $VMCORE-incomplete & cp /proc/vmcore $VMCORE-incomplete >/dev/null exitcode=$? if [ $exitcode == 0 ] then mv $VMCORE-incomplete $VMCORE echo -e "\\033[0JSaving core complete" fi fi umount /mnt [ $exitcode == 0 ] && reboot -f echo Attempting to enter user-space to capture vmcore ... Second test, - config file ext3 "LABEL=KDUMP TEST" - start Kdump: No kdump initial ramdisk found.[WARNING] Rebuilding /boot/efi/efi/redhat/initrd-2.6.18-116.el5kdump.img error: quote mismatch for LABEL=KDUMP usage: find [-type type] [path [-name file]] Starting kdump:[ OK ] - mkdumprd snip: ... + case "$config_opt" in ++ echo '#options' ++ grep '^#.*$' + IS_COMMENT='#options' + '[' -n '#options' -o -z 'modulename options' ']' + continue + read config_opt config_val + case "$config_opt" in ++ echo '#default' ++ grep '^#.*$' + IS_COMMENT='#default' + '[' -n '#default' -o -z shell ']' + continue + read config_opt config_val + case "$config_opt" in ++ echo ext3 ++ grep '^#.*$' + IS_COMMENT= + '[' -n '' -o -z '"LABEL=KDUMP TEST"' ']' + USING_METHOD=filesystem + echo '"LABEL=KDUMP' 'TEST"' + egrep -q '^(LABEL|UUID)=' + handlelvordev '"LABEL=KDUMP' 'TEST"' ++ lvs --noheadings -o vg_name '"LABEL=KDUMP' + local vg= + '[' -z '' ']' +++ echo '"LABEL=KDUMP' +++ sed -e 's#^/dev/mapper/\([^-]*\)-\(.*\)$#/dev/\1/\2#' ++ lvs --noheadings -o vg_name '"LABEL=KDUMP' + vg= + '[' -n '' ']' + findstoragedriver '"LABEL=KDUMP' + for device in '$@' + echo '"LABEL=KDUMP' + sed '-es/\/dev\///' '-es/[0-9]\+//' + case " $handleddevices " in + handleddevices=' cciss/c0d0p2 "LABEL=KDUMP' ... - init from the initramfs snip: ... echo Saving to the local filesystem "LABEL=KDUMP TEST" DUMPDEV="LABEL=KDUMP TEST" IS_LABEL=`echo $DUMPDEV | grep LABEL` IS_UUID=`echo $DUMPDEV | grep UUID` if [ -n "$IS_LABEL" -o -n "$IS_UUID" ] then DUMPDEV=`findfs $DUMPDEV` fi fsck.ext3 $DUMPDEV mount -t ext3 $DUMPDEV /mnt if [ $? == 0 ] then mkdir -p /mnt//var/crash/127.0.0.1-$DATE VMCORE=/mnt//var/crash/127.0.0.1-$DATE/vmcore export VMCORE monitor_cp_progress $VMCORE-incomplete & cp /proc/vmcore $VMCORE-incomplete >/dev/null exitcode=$? if [ $exitcode == 0 ] then mv $VMCORE-incomplete $VMCORE echo -e "\\033[0JSaving core complete" fi fi umount /mnt [ $exitcode == 0 ] && reboot -f echo Attempting to enter user-space to capture vmcore echo Creating root device. ... The working example, - config file: ext3 LABEL=KDUMP-TEST - start Kdump: Detected change(s) the following file(s): /etc/kdump.conf Rebuilding /boot/efi/efi/redhat/initrd-2.6.18-116.el5kdump.img Starting kdump:[ OK ] - mkdumprd snip: ... + case "$config_opt" in ++ echo '#default' ++ grep '^#.*$' + IS_COMMENT='#default' + '[' -n '#default' -o -z shell ']' + continue + read config_opt config_val + case "$config_opt" in ++ echo ext3 ++ grep '^#.*$' + IS_COMMENT= + '[' -n '' -o -z LABEL=KDUMP-TEST ']' + USING_METHOD=filesystem + echo LABEL=KDUMP-TEST + egrep -q '^(LABEL|UUID)=' ++ findfs LABEL=KDUMP-TEST + config_val=/dev/mapper/VolGroup00-LogVol00 + handlelvordev /dev/mapper/VolGroup00-LogVol00 ++ lvs --noheadings -o vg_name /dev/mapper/VolGroup00-LogVol00 + local 'vg= VolGroup00' + '[' -z ' VolGroup00' ']' + '[' -n ' VolGroup00' ']' ++ echo VolGroup00 + vg=VolGroup00 + case " $vg_list " in + read config_opt config_val + case "$config_opt" in ++ echo '#ext3' ++ grep '^#.*$' + IS_COMMENT='#ext3' + '[' -n '#ext3' -o -z /dev/mapper/VolGroup00-LogVol00 ']' + continue + read config_opt config_val + '[' -n '' -a '!' -e /sys/kernel/vmcoreinfo ']' ... - init from the initramfs snip: ... echo Saving to the local filesystem LABEL=KDUMP-TEST DUMPDEV=LABEL=KDUMP-TEST IS_LABEL=`echo $DUMPDEV | grep LABEL` IS_UUID=`echo $DUMPDEV | grep UUID` if [ -n "$IS_LABEL" -o -n "$IS_UUID" ] then DUMPDEV=`findfs $DUMPDEV` fi fsck.ext3 $DUMPDEV mount -t ext3 $DUMPDEV /mnt if [ $? == 0 ] then mkdir -p /mnt//var/crash/127.0.0.1-$DATE VMCORE=/mnt//var/crash/127.0.0.1-$DATE/vmcore export VMCORE monitor_cp_progress $VMCORE-incomplete & cp /proc/vmcore $VMCORE-incomplete >/dev/null exitcode=$? if [ $exitcode == 0 ] then mv $VMCORE-incomplete $VMCORE echo -e "\\033[0JSaving core complete" fi fi umount /mnt [ $exitcode == 0 ] && reboot -f echo Attempting to enter user-space to capture vmcore echo Creating root device. ... Created attachment 317822 [details]
new version of patch
Here you go. I tested this one out and it fixed the problem for me. Please confirm and I'll check it in ASAP. Thanks!
Great! ext3 LABEL="KDUMP TEST" works. Thank you! Great! Thank Cai, I'll drum up the pm ack and get this checked in monday ASAP. fixed in -42.el5. You know, that kdump_chk value is just looking to verify the presence of binaries, we really don't need it. I'm removing it entirely, its not worth the effort to keep around. Fixed in -46 *** Bug 467483 has been marked as a duplicate of this bug. *** *** Bug 468114 has been marked as a duplicate of this bug. *** >Comment #14 From Issue Tracker (tao) 2008-10-19 21:53:23 EDT [edited]
>---
>I confirmed this problem is fixed by using kexec-tools-1.102pre-46.el5.
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 therefore 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-2009-0105.html |