Bug 683769

Summary: mkdumprd basename: missing operand
Product: [Fedora] Fedora Reporter: Lukas Bezdicka <social>
Component: kexec-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: littlebeastml, nhorman, qcai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kexec-tools-2.0.0-45 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-28 15:10:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Proposed fix
none
Another fixup needed for mkdumprd to finish none

Description Lukas Bezdicka 2011-03-10 11:01:03 UTC
Description of problem:
mkdumprd -f /boot/initramfs-2.6.38-0.rc8.git0.1.fc15.x86_64.img 2.6.38-0.rc8.git0.1.fc15.x86_64
basename: missing operand
Try `basename --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.


How reproducible:
always

Additional info:
kexec-tools-2.0.0-41.fc15.x86_64

seems to be problem on line 375 in mkdumprd

Comment 1 Takasimadaira 2011-03-11 01:23:18 UTC
Try "mkdumprd -d -f /boot/initramfs-2.6.38-0.rc8.git0.1.fc15.x86_64.img
2.6.38-0.rc8.git0.1.fc15.x86_64"

Read /etc/rc.d/init.d/kdump and you can understand.

Comment 2 Lukas Bezdicka 2011-03-11 10:43:01 UTC
mkdumprd -d -f /boot/initramfs-2.6.38-0.rc8.git0.1.fc15.x86_64.img 2.6.38-0.rc8.git0.1.fc15.x86_64
basename: missing operand
Try `basename --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

I reported it because /etc/rc.d/init.d/kdump fails.
kdump.conf:
path /var/crash
ext4 UUID=416ba429-4dba-49a1-aa44-1b3837fff2ea
core_collector makedumpfile -c

Comment 3 Neil Horman 2011-03-11 14:11:36 UTC
There is no use of the basename command on line 375 in mkdumprd.  Can you run the mkdumprd command with set -x appended right after the top line in the file?

Comment 4 Lukas Bezdicka 2011-03-11 16:46:11 UTC
sorry I had some debug stuff there already, it's 
    modalias=$(cat $(find /sys/devices -name modalias | grep $(basename $(readlink ./device))))

+ '[' -z /sys/block/sda ']'
+ pushd /sys/block/sda
+ findstoragedriverinsys
+ '[' '!' -L device ']'
++ readlink ./device
+ cd ../../../0:0:0:0
+ '[' '!' -f modalias ']'
+++ find /sys/devices -name modalias
+++++ readlink ./device
++++ basename
basename: missing operand
Try `basename --help' for more information.
+++ grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
++ cat

Comment 5 Lubomir Rintel 2011-03-14 17:50:28 UTC
Created attachment 484262 [details]
Proposed fix

Saw it as well; this fixed that.

Comment 6 Lubomir Rintel 2011-03-14 17:52:18 UTC
Created attachment 484263 [details]
Another fixup needed for mkdumprd to finish

Attaching another fix here, that was needed for mkdumprd to finish correctly so that fix the original issue could be verified.

Comment 7 Lukas Bezdicka 2011-03-14 19:23:43 UTC
thanks a lot, works for me.

Comment 8 Neil Horman 2011-03-28 15:10:04 UTC
fixed in kexec-tools-2.0.0-45.  Thanks!