Bug 221641 - kdump needs to initially check on whether available size is greater than $memtotal
Summary: kdump needs to initially check on whether available size is greater than $mem...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Neil Horman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-05 19:52 UTC by Akira Imamura
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-13 17:39:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
This patch is based on -158.el5 and, can fix this problem. (3.25 KB, patch)
2007-01-05 19:52 UTC, 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 21:04 UTC, Akira Imamura
no flags Details | Diff

Description Akira Imamura 2007-01-05 19:52:42 UTC
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 19:52:50 UTC
Created attachment 144924 [details]
This patch is based on -158.el5 and, can fix this problem.

Comment 2 Neil Horman 2007-01-05 20:18:27 UTC
looks good, but you skipped the ssh case.

Comment 3 Akira Imamura 2007-01-05 21:04:19 UTC
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 21:12:31 UTC
modified patch checked into  -160.el5.  Thanks.

Comment 5 Neil Horman 2007-01-05 21:13:52 UTC
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-06 00:00:42 UTC
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 17:38:52 UTC
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.