Commit Graph

345 Commits

Author SHA1 Message Date
Dave Young 5e85d20d34 use fstab-sys to mount nfs
dump_nfs mount the nfs share to /mnt, it's not what we expected.
Change to use dracut fstab mount infrastructure for this.
After the fix nfs dump is just same as localfs dump.

The --mount for nfs does not work before, it depend on the upstream patch:
1. dracut fix to autoload nfs.ko in case nfs4. the patch post as below:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2768

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-23 15:31:22 +08:00
Dave Young a49b0881a8 rename function dump_localfs
nfs will be handled in fstab-sys as well as localfs.
so rename dump_localfs to dump_fs firstly.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-23 15:31:15 +08:00
Dave Young 3d470c4be2 dump_localfs error path fix
in dump_localfs, we should error out if fstab mount fails
Also error out if mkdir fails.

vivek: display error message for debugging purpose.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-23 15:31:08 +08:00
Dennis Gilmore 423e0019c4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-19 12:59:40 -05:00
Dave Young aa25382075 update kexec-kdump-howto.txt about systemctl commands
We should use systemctl instead of service to start/restart the kdump service
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 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 6520b8f245 remove useless dracut cmdline '-c /dev/null'
For "-c /dev/null" Harald mentioned that it is useless.
In fact, dracut code [[ -f /dev/null ]] will return false thus it will still use
the default config file

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Cong Wang <amwang@redhat.com>
2012-07-12 11:15:36 +08:00
Dave Young 7699429c09 remove useless dracut cmdline for kernel-modules and kdumpbase
kernel-modules and kdumpbase will be included automaticlly when check() pass.
So no need explictly specify them in dracut cmdline.

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 4d37a55bc1 install core_collector in module-setup.sh
file install code should stay in module-setup.sh, move core_collector installation
code as well.

Note: mkdumpfile is installed twice before, one is dracut cmdline, another is
module_setup.sh. This patch removed the duplicate code in dracut cmdline.

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 9f5af7aca8 install extra_bins in module-setup.sh
moving file install code to module-setup.sh looks better.
This patch move extra_bins installation to module-setup.sh

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 8ec4877f7b remove busybox dependency
We do not depend on busybox anymore, so remove it from Requires field.

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 1c38f02031 improve warning message of space checking
For core_collector like makedumpfile use case, it will compress and filter the
vmcore so free space small than memtotal is mostly ok. But we can not guarantee
it will be always ok.

The "there is not enough space" is not accurate, improve it to "there might be
not enough space"

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 ec8e35a790 do not mount root twice
Resolves: bz821997

dracut will mount rootfs for us, so we need not pass root to fstab again here.
Here remove the root-mount line.

This will depends on the root=cmdline is right, by default kdump will
inherit it from /proc/cmdline.

Vivek: add document about the assumption for the root= cmdline issue.

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 88b03bf0ba do not add fstab-sys module in dracut cmdline
fstab-sys module will be added automaticlly when there's --mount passed
So no need to explictly add it in dracut cmdline

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 b14b692242 omit dash module
dash is be default omited in f17, but we use -o in command line so our omit
modules list will overwrite the system configs, so dash will be installed to
initramfs.

Here avoid install dash by adding it to the '-o' list
Also remove dash dependency from rpm spec

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 57f8e18d17 network dns config fix
In case explict DNS setup in ifcfg file, we should add proper cmdline
for dracut network use.

Add a kdump_setup_dns function to handle this.
v1->v2: vivek: use echo instead of 'echo -n'

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 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 2e730e047e Release 2.0.3-51 2012-07-05 16:57:03 +08:00
dyoung@redhat.com 7148c0a30d add s390x netdev setup
s390x netdev need special cmdline to bring up
parse the ifcfg file to append proper cmdline, also add znet dracut module

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-05 16:52:12 +08:00
dyoung@redhat.com e8693e46f6 Add s390x support
Enable s390x, add same sysconfig as rhel6

Resolve: bug 813154

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-05 16:48:46 +08:00
dyoung@redhat.com a67cebf1bf Cleanup temp file leaved at /tmp/
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>
2012-07-05 16:41:49 +08:00
dyoung@redhat.com a71cead537 add check_size function for fs dump
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>
2012-07-05 16:39:27 +08:00
dyoung@redhat.com 2cb3c1cbc4 add ssh check_size
check available size of ssh target before dumping
remove unused check_remote()
v2: vivek: add error handling

Resolves: bz806196

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-05 16:39:08 +08:00
dyoung@redhat.com ea5c605d16 blacklist patch apply fix
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>
2012-07-05 16:38:29 +08:00
Cong Wang f9c56b3f6e Respect bonding mode
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>
2012-07-05 16:35:16 +08:00
Cong Wang 469bdf2cae Support dump over vlan tagged bonding
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>
2012-07-05 16:34:54 +08:00
Dave Young b5f7f39ee6 Release 2.0.3-50 2012-06-22 15:53:04 +08:00
dyoung@redhat.com 1b30666cac add blacklist option
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>
2012-06-22 15:38:42 +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 b30eb78ab2 raw core_collector fix
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>
2012-06-14 09:57:07 +08:00
Dave Young 2697669fa9 ssh core_collector fix
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>
2012-06-14 09:56:10 +08:00
Dave Young 33d933f800 drcut-kdump.sh: cleanup kdump.conf check
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>
2012-06-14 09:55:54 +08:00
Dave Young 16e24a1197 Release 2.0.3-49
bump version to 2.0.3-49
2012-06-12 13:30:58 +08:00
Dave Young 5d1bd77aed cleanup DUMP_INSTRUCTION handling
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>
2012-06-12 09:42:39 +08:00
Dave Young 6f312004e9 final reboot behavior fix
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>
2012-06-12 09:42:35 +08:00
Dave Young d5bc608abd dump_rootfs for default target fix
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>
2012-06-12 09:42:29 +08:00
Cong Wang e720fcdadf add vlan support
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>
2012-06-11 14:03:26 +08:00
Cong Wang 999870558b fix and refactor bond handling code
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>
2012-06-11 14:03:12 +08:00
Cong Wang 725dae14ac fix and refactor bridge handling code
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>
2012-06-11 14:02:47 +08:00
Dave Young 2aa51e665f core_collector doc basic fix
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>
2012-06-11 10:57:53 +08:00
Dave Young 7a7ecb150b omit plymouth module
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>
2012-06-06 16:26:32 +08:00
Dave Young 12a1b3061e mkdumprd manpage cleanup manpage
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>
2012-06-06 16:24:37 +08:00
Dave Young 7e82b251c6 mkdumprd: remove --debug
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>
2012-06-06 16:24:32 +08:00
Dave Young d88c0390b8 mkdumprd: remove noconf
noconf is not supported, remove the --noconf in mkdumprd

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-06-06 16:24:28 +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 b814dcb097 kdump.conf add sshkey
Add sshkey info to kdump.conf and kdump.conf.5

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-06-06 16:24:19 +08:00
Dave Young 21e9e33e0b kdump.conf remove disk_timeout
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>
2012-06-06 16:24:14 +08:00
Dave Young f318fbfed5 kdump.conf make path uncommented
uncomment our default path line

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-06-06 16:24:10 +08:00
Dave Young df18065508 kdump.conf.5 add default poweroff
Add missing poweroff to default options in kdump.conf.5

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-06-06 16:22:50 +08:00