All these options are not valid for current mkdumprd. So remove them.
Leave a minimal mkdumprd.8
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
dracut args pass through will be introduced later, remove this firstly.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
-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>
disk_timeout should be handled by dracut. remove it from kdump.conf[.5]
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Default shell of kdump module is bash instead of msh, fix the doc
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
If default action is not set kdump will by default dump to root fs
Fix kdump.conf[.5] about this issue
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
kernel module options is not implemented yet, remove them from kdump.conf.5
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
kdump_post and kdump_pre are not implemented, remove them from kdump.conf[.5]
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Dracut and udev handles bringing up network, remove the legacy link_delay
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz808817
use systemctl try-restart kdump.service instead of old /etc/init.d/kdump restart
systemctl try-restart will restart kdump service only if the kdump service is runing. Original behavior is wrong when user does not chkconfig on the service.
Tested the cpu online/offline events.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz822739
We hardcoded with dhcp in dracut cmdline before.
Fix it by parsing ifcfg to get the proper proto,
echo proper cmdline for both static and dhcp
[v1->v2]: amwang - handle PREFIX as well
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Cong Wang <amwang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
BZ: 822701
This patch implements basic software iscsi dump support. Complex iscsi
setups like ibft etc might not work.
iscsi self configuration logic is currenlty part of kdump module. At some
point of time I would like to see it in dracut iscsi module instead of
kdump module when iscsi and other subsystems become self configuration aware
for general boot.
This patch will require work for complex setups. Some of them are.
- IPV6 support
- IBFT support
- Parsing some more advanced parameters and passing to netroot option.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
BZ: 822701
This allows to reuse same function from iscsi setup code too. Also makes
code more modular.
[dyoung: add a missed space]
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Resolves: 707441
Provide a script rhcrashkernel-param.sh to generate cmdline, so anaconda can just
call it, we can easily add more logic into this script later.
Note: Currently for fedora only adding null output for testing purpose.
Signed-off-by: Dave Young <dyoung@redhat.com>
Suggested-by: Vivek Goyal <vgoyal@redhat.com>
cleanup module_setup.sh, move code blocks to functions.
[v1->v2]: vivek: add kdump_ prefix to kdump functions because dracut
source this file
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805773
simplify logic and remove redundant code:
put do_default_action to add_dump_code
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz816864
currently kexec-tools maintains kdump dracut modules as below dir hierarchy:
[dave@localhost fedpkg]$ tree kexec-tools/kdump_dracut_modules
kexec-tools/kdump_dracut_modules
`-- 99kdumpbase
|-- kdump.sh
`-- module-setup.sh
But in kexec-tools.spec, sources line is below:
Source100: dracut-files.tbz2
So we need to manually generate the dracut-files.tbz2, upload it, modify
the sources file which contains the md5sum of these binaies, and then do
the building. The more headache problem is this make local tests of
changes to kdump module hard.
To ease future work, move the files to TOPDIR, cp the sources instead.
Thanks for help from dzickus
[v1->v2]: Also remove dracut-files.tbz2 from sources file
ChaoWang: add prefix to dracut files
BZ: 817044
Harald suggested that we use --add kdumpbase instead of -m kdumpbsae. As
-m means only use modules specified on the command line. I am not sure
that kdump will ever know the list of modules it wants to use. It might
be a good idea to let dracut decide it based on --mount option.
Also start using --hostonly to make sure atleast our default dumping to
root disk always works.
I also noticed that with --add and --hostonly initramfs size came down. So
for the time being just bring down the initramfs size.
But it still looks big and this area will require more experimentation and
bug fixing to make sure we are generatiing optimal size images for kdump
purposes and get rid of bloat. I am just beginning to understand dracut,
so expect more churn in this area down the line from me.
I am posting this patch for the bz opened again F18. As it is reducing
initramfs size significantly, I think it is a good idea to commit it
in F17 branch also.
Following is image size comparision.
Dump to root disk.
------------------
vanilla compressed: 13MB
hostonly compressed: 7.5MB
Dump to nfs
-----------
vanilla compressed: 24MB
hostonly compressed: 13MB
Dump over ssh
-------------
vanilla compressed: 23.5 MB
hostonly compressed: 12 MB
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Resolves: bz816862
Make the variables in get_mp() local, otherwise they are global
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz816860
dracut pre-pivot hook splited to two hooks: pre-pivot and pre-pivot-cleanup
all the cleanup related scripts are moved to pre-pivot-cleanup hook
Because we depends on some early scripts like fstab-sys, also we must run before
cleanup stuff like dhclient killing, so just move kdump script to the end of
pre-pivot hook
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
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>
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>
Resolves: bz810107
in case nic renaming we will failed to bring up network.
Resolve this issue by pass mac addr to 2nd kernel cmdline, let dracut deal
with the udev rename
[v1->v2]: amwang: use ip instead of ifconfig
Signed-off-by: Dave Young <dyoung@redhat.com>
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>
Build kdump image will fail when kdump.conf has net option with a host name
instead of ip address.
Handle this just as what we do in rhel6: use getent to get the ip addr.
Signed-off-by: Dave Young <dyoung@redhat.com>
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>