Bug 507790

Summary: kexec to HP-UX over ssh failed because of mktmp on HP-UX
Product: Red Hat Enterprise Linux 5 Reporter: masanari iida <masanari_iida>
Component: kexec-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED NOTABUG QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: low Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-24 10:53:56 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:

Description masanari iida 2009-06-24 10:03:17 UTC
Description of problem:
As I set up kexec memory dump to HP-UX over ssh,
it failed to start to kdump service


Version-Release number of selected component (if applicable):
kexec-tools-1.101-194.4.el5

How reproducible:
Always

Steps to Reproduce:
1. Configure kexec over ssh within /etc/kdump.conf.
   The dump server is on HP-UX.
2. start kdump
  
Actual results:

 Rebuilding /boot/initrd-2.6.18-53.1.4.el5kdump.img
 couldn't generate a unique pathname
 /etc/kdump.conf: Could not create temp directory in 
 wtec.hp.com:/home/wtec/crash Failed to run mkdumprd
 Starting kdump:                                            [FAIL]

Expected results:
kdump should start.


Additional info:
When mkdumprd started, mkdumprd check remote directory to see
if it can create a directory using mktemp command.
In this case, mktemp on HP-UX is used.
HP-UX has this command, but the option is bit different,
so following command got error and failed to initialize.

HPUX$ mktemp -dqp /home/abc123/crash
 couldn't generate a unique pathname

> HPUX$ man mktemp
> 
>  mktemp(1)                                                   mktemp(1)
> 
>  NAME
>       mktemp - make a name for a temporary file
> 
>  SYNOPSIS
>       mktemp [-c] [-d directory_name] [-p prefix]

I don't say this is a bug for kexec-tools on Red Hat.
I would like to make a note here that in the real world, 
this type of trouble could happen.

Workaround:

Modify following part of the mkdumprd to commented out.
This modification disable remote node's free size check.

>         else
>             #SSH path
>             #rebuild $config_val replacing machine name with 
> ip address
>             ...
>             tdir=`ssh -q $s_opts $rlocation mktemp -dqp 
> $SAVE_PATH </dev/null`
>             if [ $? != "0" ]; then
>                 echo "$KDUMP_CONFIG_FILE: Could not create 
> temp directory in $c\ onfig_val:$SAVE_PATH"
>                 exit 1
>             fi
>             ...

I would welcome that RH to modify kexec-tool side,
and the bottom line is RH to document this cases in kexec-kdump-howto.txt.
Then we can understand not all unix system can be used as kexec dump server.

Thanks

Comment 1 Neil Horman 2009-06-24 10:53:56 UTC
Yeah, I'm not sure where Hp-UX draws its mktempt sources from, but it sounds like they need to update to a version with the -q option available.  Until then, people can find this bug to figure out what to do.