Bug 507790 - kexec to HP-UX over ssh failed because of mktmp on HP-UX
kexec to HP-UX over ssh failed because of mktmp on HP-UX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Neil Horman
Red Hat Kernel QE team
Depends On:
  Show dependency treegraph
Reported: 2009-06-24 06:03 EDT by masanari iida
Modified: 2009-06-24 06:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-24 06:53:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description masanari iida 2009-06-24 06:03:17 EDT
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):

How reproducible:

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@uxas1.jpn.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)
>       mktemp - make a name for a temporary file
>       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.


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.

Comment 1 Neil Horman 2009-06-24 06:53:56 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.