Commit Graph

12 Commits

Author SHA1 Message Date
Dave Young
f75f34b8a9 ssh propagate alert message fix
we now switched to systemd, 'service kdump propagate' does not work anymore.
update the alert message to use 'kdumpctl propagate'
vivek: update kexec-kdump-howto.txt as well.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-12 11:15:36 +08:00
Dave Young
e444daa5ac shell exit value fix
exit the saved $? instead of the wrong one after echo line
v1->v2: vivek, save the return value instead of exit 1

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-12 11:15:35 +08:00
Dave Young
4e4a173698 Add kdump_post and kdump_pre support
Original patch is from Amerigo, but it has changed a lot:
remove multi dump
refreshed with latest git for the dump instruction function restructure
fixed the behavior of do_kdump_pre, if kdump_pre fails it will reboot
update the docs
check the existance and executable of kdump_pre/post files,
also check the timestamp of them for rebuilding.

refresh patch,
Address comments from vivek:
s/hush/bash in docs
fix the copy-paste error in kdump post error message
s/reboot\/halt/reboot in kexec-kdump-howto.txt

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-06-14 09:57:30 +08:00
Dave Young
836815ff67 Port check_config from rhel6
Resolves: bz805778

Simply the logic and optimize the code

Move check_exist, check_executable, rebuild_initrd to functions

remove BOOTDIR which is not used

Note: There might be modules which are newer than last built initramfs,
we always rebuild the initramfs when extra_moduels= is specified.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-06-14 09:57:27 +08:00
Dave Young
d6cc7ff7dc makedumprd: remove -d
-d option is not implemented and unused, remove it from mkdumprd

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-06-06 16:24:23 +08:00
Dave Young
24eaa7da8f port raw dump from rhel6 [v7]
Resolves: bz805783

kdumpctl: save_raw if found vmcore
mkdumprd: checking available size of raw disk
dracut module: do the dumping

Note, add a dir /kdumpscripts for monitor_dd_progress and future
kdump scripts
[v1->v2]: monitor_dd_process become a script instead of a function
          add missed utils
          use pipe with dc
[v2->v3]: Don: fix dd_progress_file typo
          Vivek: move [ -f $conf_file ] earlier
                 don't split keyfile= and [ -f keyfile ]
                 move default core_collector earlier
                 move non-makedumpfile warnings to mkdumprd
                 make check available size a common function
          Amerigo: use less pipe for grep then awk print
                   use shell (( )) instead of dc
          use cut instead of awk
          no need install dc and awk
          make DD_BLKSIZE a variable
          don't add 0755 file in git, chmod in module-setup.sh
[v3->v4]: vivek: kdumpctl multi raw target handling
          monitor_dd_progress- fix wrong size calculation:
          the tail -1 of dd pregress file is in bytes instead of blocks
          only print the whole dd src file size for non-filtered case
          check [ -b raw target device ] before dump
[v4->v5]: vivek: move check [ -b $1 ] before monitor_dd_progress
          remove multi target function
[v5->v6]: vivek: only warning for raw dump of non-makedumpfile core_collector
[v6->v7]: kdumpctl should return 0 when there's no raw target

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-05-02 10:06:51 +08:00
Dave Young
b71fc17869 remove multi dump [v2]
remove multi dump

Resolves: bz816859

multi dump was not written as a failsafe dump. Also it was not really tested.
It introduced more complexity in the early phase of porting plenty of rhel6
functions, so we'd remove it and concentrate on the base functionalities.

[v1->v2]: vivek: better error message

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-05-02 10:06:47 +08:00
Chao Wang
f590d235e0 Handle net option for nfs in kdump.conf correctly
Resolve: bug 807521

The fix is easy.

Command sed should be called with option -n to remain slience when DUMP_TARGET
is a nfs server like 'nfs.server:/mnt/testarea/nfs'.

Then nfs function check_ssh_config will return 1 to not to config nfs like a
ssh dump

Signed-off-by: Chao Wang <chaowang@redhat.com>
2012-03-30 11:36:51 +08:00
Dave Young
ba0aa24316 Add ssh dump support
Add ssh dump support

changes including below items:
1. sshkey option
2. sshkey propagate
3. fix a bug of  _server ip calculation for dump target string
4. change the prefix of kdump hook from 93 to 01 to avoid dhclient and
   other cleanups happening before us
5. enable network with dracut cmdline rd.neednet=1 when there's network
   target config

[v1 - v2]:
Only check_ssh_target when there's ssh dump target in kdump config file

[v2 -> v3]
style fixes: trailing spaces and space before tab indent
remove set -x
simply check_ssh_target
use awk to get sshkey option value
change pivot hook order to 0000

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-02-22 14:12:57 +08:00
Amerigo Wang
0ce85b362d kexec-tools: rename initrd to initramfs 2011-07-27 18:05:04 +08:00
Amerigo Wang
4a7c912848 kdumpctl: remove obsolete code 2011-07-25 18:04:32 +08:00
Neil Horman
10c91a1493 Removing sysvinit files 2011-07-06 15:25:34 -04:00