Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1519613 - Kdump_post parameter in kdump.conf set, but not validated yet as expected.
Summary: Kdump_post parameter in kdump.conf set, but not validated yet as expected.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kexec-tools
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: kdump team
QA Contact: Kernel General QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-01 02:41 UTC by indicoliteplus
Modified: 2017-12-01 09:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-01 09:16:46 UTC


Attachments (Terms of Use)

Description indicoliteplus 2017-12-01 02:41:36 UTC
Description of problem:

I used kdump to generate vmcore file, but found kdump_post parameter in kdump.conf not validated yet.


cat /etc/kdump.conf
--------------------------------------------
path /var/crash
core_collector makedumpfile -l --message-level 1 -d 31
kdump_post /var/crash/scripts/kdump-post.sh

cat /var/crash/scripts/kdump-post.sh
--------------------------------------------
#!/bin/bash
set -x
cp /var/log/messages /var/crash
cp /var/log/libvirt/*.log /var/crash

Version-Release number of selected component (if applicable):


How reproducible:
each time, reproducible

Steps to Reproduce:
1. set kdump.conf
2. set kdump-post.sh
3. restart kdump.service
4. trigger sysrq-trigger


Actual results:

[root@localhost ~]# ssh root@192.168.122.198
Last login: Fri Dec  1 10:23:44 2017 from 192.168.122.1
[root@bingo ~]# ll /var/crash/
Total 0
drwxr-xr-x. 2 root root 44 12  1 2017 127.0.0.1-2017-12-01-11:43:32


Expected results:
the directory /var/crash can contain messages and libvirt.log

Additional info:
None. Thanks. ;)

Comment 2 indicoliteplus 2017-12-01 02:56:52 UTC
I checked man 5 kdump.conf, but not found useful info about kdump_post.

Also checked below info: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/kernel_crash_dump_guide/sect-kdump-config-cli

Comment 3 Ngo Than 2017-12-01 07:22:29 UTC
reassign to correct component

Comment 4 Dave Young 2017-12-01 07:52:23 UTC
Can you try add extra_bins in kdump.conf?

extra_bins /var/crash/scripts/kdump-post.sh

Comment 5 indicoliteplus 2017-12-01 08:10:14 UTC
Tried, but failed as above. kdump-post.sh not validated yet. ;(

Comment 6 Dave Young 2017-12-01 08:50:50 UTC
Hmm, the directory you used are initramfs directory in 2nd kernel, that means copy from and to ram instead of your original rootfs/dump target,  suppose you use rootfs as dump target, maybe "cp /sysroot/var/log/messages /sysroot/var/crash" work, but this can not be garanteed since the mount point in kdump kernel is some internal logic, it may change thus it is not reliable.

Comment 7 indicoliteplus 2017-12-01 09:00:55 UTC
(In reply to Dave Young from comment #6)
> Hmm, the directory you used are initramfs directory in 2nd kernel, that
> means copy from and to ram instead of your original rootfs/dump target, 
> suppose you use rootfs as dump target, maybe "cp /sysroot/var/log/messages
> /sysroot/var/crash" work, but this can not be garanteed since the mount
> point in kdump kernel is some internal logic, it may change thus it is not
> reliable.


Yep, it works! I'll read some more.
Thanks a lot, Dave. :)

Comment 8 Dave Young 2017-12-01 09:16:46 UTC
Ok, glad to see it works for you.


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