module_setup.sh removed comment and blank lines of kdump.conf, then install it
to initramfs, but it leaved the /tmp/$$-kdump.conf which should be removed.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz806196
Adding check_size function for filesystem dump, also move common code to
top of the file because get_fs_size need know the mount point.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
The original blacklist patch was applied without conflict.
But in fact there's exactly same context with amerigo's original patch and
it's in wrong place!
Moving it to the right switch branch..
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Update: use /sys/class/net/bondX/bonding/mode
We should set the mode of the bonding properly
in the second kernel too.
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Update: error out vlan over bridge case
This patch adds support for vlan tagged bonding,
in theory, we could support other complex setup as well,
in practice, this is not easy, so just support vlan
tagged bonding, which is the one we support in RHEL6.
Note, this patch depends on the dracut patch:
http://marc.info/?l=initramfs&m=134025049228510&w=2
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
For the "blacklist" here, it means prevent the kernel modules
from loading into kdump initrd, which is different from RHEL6.
Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
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>
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>
1. only append '-F' for default core_collector internally
2. error out if user does not add '-F' for makedumpfile
v1->v2: refresh because of new core collector verify function
v2->v3: optimize the code, remove local variable for default core_collector
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
1. add core_collector filter support to ssh dump
2. scp can be specified in kdump.conf
3. error out if no '-F' with makedumpfile
4. add proper explanation and examples to kdump.conf[.5] and kexec-kdump-howto.txt.
v1->v2: add verify_core_collector function
v2->v3: optimize the code, remove local variable for default core_collector
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
move conf_file as a global variable to the top.
vivek: return earlier if kdump.conf is not found in read_kdump_conf to
avoid the deep indent.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
let add_dump_code only deal with real dump instruction,
move other logic out of that function, so it's easier for future features
like kdump_pre and kdump_post.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
default action is handled in DUMP_INSTRUCTIONI. If default_action failed
current logic will cause mount_root_run_init, It does not make much sense.
changes to: let reboot -f does not depend on return status of DUMP_INSTRUCTION
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Do not reboot in dump_rootfs function, also do not directly call dump_rootfs
for default dump. Instead just adding it to DUMP_INSTRUCTION as other
user specified dump target.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This patch depends on the latest dracut in git.
It adds support of dumping over a vlan device.
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
This patch fixes dumping over a bonding interface,
we should pass ifname= for all its underlying slaves,
which is required by dracut.
And it separates the code into a different function.
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
This patch fixes dumping over a bridge interface,
we should pass ifname= for all its underlying devices,
which is required by dracut.
And it separates the code into different functions,
for later patches to use.
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Update core_collector in kdump.conf[.5]:
1. accept <command> not limited to makedumpfile
2. add notes about default core_collector
3. add notes about flattened vmcore
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz821997
while root is set to dump target, it can not be unmounted because plymouthd
are holding it. umount failing will cause calling of default_action.
Omit plymouth module to fix this issue.
Also drop "--add dash" or dracut will report error "dash is not found", this
is because default fedora dracut.conf will omit dash.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
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