Bug 221641 - kdump needs to initially check on whether available size is greater than $memtotal
kdump needs to initially check on whether available size is greater than $mem...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Neil Horman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-05 14:52 EST by Akira Imamura
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-13 12:39:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This patch is based on -158.el5 and, can fix this problem. (3.25 KB, patch)
2007-01-05 14:52 EST, Akira Imamura
no flags Details | Diff
This patch is based on -158.el5 and, can fix this problem. (4.58 KB, patch)
2007-01-05 16:04 EST, Akira Imamura
no flags Details | Diff

  None (edit)
Description Akira Imamura 2007-01-05 14:52:42 EST
Description of problem:
The kdump service needs to initially check on whether available size
is greater than $memtotal. The service should warn admins in the case
that there is not space enough to save a vmcore.
According to mkdumprd, this issue remains TODO.

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

How reproducible:
Always

Steps to Reproduce:
1. Configure kdump.conf so that there is not space enough to save a vmcore.
2. Run "service kdump restart"
3.
  
Actual results:
The kdump service shows no warning as below.

Stopping kdump:                                            [  OK  ]
Detected /etc/kdump.conf or /boot/efi/efi/redhat/vmlinuz-2.6.18-1.2910.el5 change
Rebuilding /boot/efi/efi/redhat/initrd-2.6.18-1.2910.el5kdump.img
Starting kdump:                                            [  OK  ]


Expected results:
The kdump service shows warning as below.

Stopping kdump:                                            [  OK  ]
Detected /etc/kdump.conf or /boot/efi/efi/redhat/vmlinuz-2.6.18-1.2910.el5 change
Rebuilding /boot/efi/efi/redhat/initrd-2.6.18-1.2910.el5kdump.img
Warning: There is not space enough to save a vmcore.
           The size of my.server.com:/export/tmp should be much greater than
15883760 bytes.
Starting kdump:                                            [  OK  ]


Additional info:
Comment 1 Akira Imamura 2007-01-05 14:52:50 EST
Created attachment 144924 [details]
This patch is based on -158.el5 and, can fix this problem.
Comment 2 Neil Horman 2007-01-05 15:18:27 EST
looks good, but you skipped the ssh case.
Comment 3 Akira Imamura 2007-01-05 16:04:19 EST
Created attachment 144931 [details]
This patch is based on -158.el5 and, can fix this problem.

I modified the previous patch.
Comment 4 Neil Horman 2007-01-05 16:12:31 EST
modified patch checked into  -160.el5.  Thanks.
Comment 5 Neil Horman 2007-01-05 16:13:52 EST
Note: you're modified patch doesn't work for the ssh case, the cut has to be
made at field 11, not 4.  The patch I checked in corrects that.
Comment 6 Akira Imamura 2007-01-05 19:00:42 EST
On my server, -160.el5 deosn't work for the ssh case. The mkdumprd
shows the following error message.

/sbin/mkdumprd: line 1599: [: 64%: integer expression expected

Once I change feild to 10, it works for the ssh case.
At that time, I found the following matter in the ssh case.
It is inappropriate that ':' is used for the tr because a colon
is used to separate user name and hostname. So, I think '|' is
better than ':' for the tr. The following patch can fix this problem.

Index: mkdumprd
===================================================================
RCS file: /cvs/dist/rpms/kexec-tools/RHEL-5/mkdumprd,v
retrieving revision 1.50
diff -p -u -r1.50 mkdumprd
--- mkdumprd    5 Jan 2007 21:11:18 -0000       1.50
+++ mkdumprd    5 Jan 2007 23:47:39 -0000
@@ -1593,7 +1593,7 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then
                             exit 1
                         fi
                         remote_df=`ssh -q $s_opts $rlocation df $tdir`
-                        available_size=$(echo $remote_df | tail -1 | tr -s '
'':' | cut -d: -f11)
+                        available_size=$(echo $remote_df | tr -s ' ' '|' |
cut-d\| -f10)

                         #check for available size is greater than $memtotal
                         if [ $available_size -lt $memtotal ]; then
Comment 7 Jay Turner 2007-02-13 12:38:52 EST
Fix confirmed with kexec-tools-1.101-164.el5.

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