Description of problem: mkdumprd is unable to copy with various of seems valid Kdump targets. The first one is a disk label which includes white spaces, # /sbin/e2label /dev/mapper/VolGroup00-LogVol00 "KDUMP TEST" Then, add the following line to kdump.conf ext3 LABEL="KDUMP TEST" or ext3 "LABEL=KDUMP TEST" or ext3 LABEL=KDUMP\ TEST As the result, Kdump failed to start, # service kdump start Detected change(s) the following file(s): /etc/kdump.conf 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]] /sbin/mkdumprd: line 1716: test: LABEL=KDUMP: binary operator expected /etc/kdump.conf: Need a location for ext3 Failed to run mkdumprd Starting kdump:[FAILED] The other problem is two similar configurations behaved totally different, ext3 /dev/mapper/VolGroup00-LogVol00 ext3 "/dev/mapper/VolGroup00-LogVol00" The former is working as expected, but the later never works. It hung forever in Kdump Kernel here, Waiting for required block device discovery Waiting for sda...Found Waiting for "mapper/VolGroup-LogVol00"... From its initramfs, the content of /etc/critical_disks is the as the following, sda "mapper/VolGroup-LogVol00" From the mkdumprd command traces, the problem is here, -+ handlelvordev '"/dev/mapper/VolGroup00-LogVol00"' -++ lvs --noheadings -o vg_name '"/dev/mapper/VolGroup00-LogVol00"' -+ local vg= -+ '[' -z '' ']' -+++ echo '"/dev/mapper/VolGroup00-LogVol00"' -+++ sed -e 's#^/dev/mapper/\([^-]*\)-\(.*\)$#/dev/\1/\2#' -++ lvs --noheadings -o vg_name '"/dev/mapper/VolGroup00-LogVol00"' -+ vg= -+ '[' -n '' ']' -+ findstoragedriver '"/dev/mapper/VolGroup00-LogVol00"' Looks like "lvs" failed to find the correct VG name. If I run the command manually, I got, # lvs --noheadings -o vg_name '"/dev/mapper/VolGroup00-LogVol00"' ""/dev/mapper/VolGroup00-LogVol00"": Invalid path for Logical Volume Version-Release number of selected component (if applicable): kexec-tools-1.102pre-40.el5 How reproducible: always
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