Commit Graph

1656 Commits

Author SHA1 Message Date
Dave Young
dfb10612a2 Handle new crashkernel= syntax in firstboot
Resolves: bz805782

Port from below patch from rhel:
commit 6a6816e97fccaf7805ba9d04fcb3f58d87bd2517
Author: amwang <amwang@redhat.com>
Date:   Fri Feb 11 06:53:27 2011 +0000

    Resolves: bug 676758.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-09 10:22:49 +08:00
Dave Young
a3ee4fffe0 Fix a localized string in firstboot
Resolves: bz805782

The text of gtk checkbutton for enable kdump was not localized.
Add gettext _() around it to make it translatable.

[update]:
-add changelog

Port below patch from rhel:
commit ce18ccc9557137b276471fbe200d7a18ce90fcf5
Author: amwang <amwang@redhat.com>
Date:   Mon Aug 9 08:20:34 2010 +0000

    Resolves: bug 619744.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-09 10:22:49 +08:00
Dave Young
4020f959c1 Configure kdump in firstboot
Resolves: bz805782
Make kdump configurable in firstboot

Add an advanced kdump config text widget, so user can configure
kdump.conf in firstboot,
[update]:
-add changelog
-remove unused variable

Port below patch from rhel:
commit e5ac50339e73b11cd9d5ba91712c43cce7ffcbcb
Author: amwang <amwang@redhat.com>
Date:   Thu Mar 17 09:18:13 2011 +0000

    Resolves: bug 598064.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-09 10:22:49 +08:00
Dave Young
752aaaa48c fix firstboot to ensure kdump svc is disabled properly
Resolves: bz805782

in case kdump is disabled, we also need to disable the kdump service
This patch is ported from below rhel patch, changed below two issues though:
1. fixed the systemctl line
2. dropped an useless line for using 0 for gtk adjustment page_size field.
see http://www.pygtk.org/pygtk2tutorial/sec-SpinButtons.html for the field doc.

Rhel6 commit is below:
commit c5735dee743fa41d14635fe2fbf5f48264bc36f6
Author: nhorman <nhorman@redhat.com>
Date:   Thu Jul 29 15:52:00 2010 +0000

    Resolves: bz 594830

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-09 10:22:49 +08:00
Dave Young
a0281590ae firstboot text domain fix
Resolves: bz805782

the text domain should be kexec-tools instead of firstboot,
or it kexec-tools translation will not find the right .mo

Backport from rhel6 bz619061
commit 18de84f91906ec41b2640f67d21eef39ecb0833b
Author: amwang <amwang@redhat.com>
Date:   Fri Jul 30 02:45:52 2010 +0000

    Resolves: bug 619061.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-09 10:22:48 +08:00
Dave Young
f1638fbe8a Update to use systemctl instead of sysv chkconfig
use systemctl to check/set the service enable/disable status

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-09 10:22:48 +08:00
Dave Young
93e13c118b port force_rebuild kdump.conf option
Add force_rebuild option in kdump.conf

Some user need always force rebuild the dumprd, add an kdump.conf
option force_rebuild here. If force_rebuild is set to 1
kdump initrd will be rebuilt every time then the service starts.

Testing:
Tested below cases:
force_rebuild
force_rebuild 0
force_rebuild 1
force_rebuild 2

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-07 13:21:36 +08:00
Chao Wang
3111ff74c9 Change return value to indicate the result of dump_raw() correctly.
Resolves bz845916.
For raw dump code below:
$CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1
in case pipe fails it will still return 0, Fix this by return the PIPESTATUS[0] at the end of this fuction.

Signed-off-by: Chao Wang <chaowang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2012-08-07 13:18:54 +08:00
Dave Young
d1d0feddf9 call dracut function for default shell
Kdump dracut hooks need to enter emergency shell, currently it directly call
"sh -i -l", with recent dracut this does not work anymore without proper ctty.

change to call dracut lib function _emergency_shell instead of directly call
'sh -i -l'

This patch depends on dracut patch:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2821

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-07 13:17:50 +08:00
Dave Young
13eefe9f48 Release 2.0.3-53
changelog contains changes since 2.0.3-51
2012-07-23 15:36:56 +08:00
Dave Young
b47c0915d2 refactor net option
Currently net options means either nfs or ssh dump.
Better to split these two into standalone options. That's more clear to user.

after the split, ssh dump need user specify "ssh user@host"
nfs dump need user specify "nfs host:nfsshare"

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-23 15:31:28 +08:00
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