Commit Graph

338 Commits

Author SHA1 Message Date
Dave Young
21398a5cdd static ip configuration support
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>
2012-05-28 09:49:25 +08:00
Vivek Goyal
e30ad0a4ec kdump: Basic iscsi target dump support (software initiator)
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>
2012-05-28 09:42:00 +08:00
Vivek Goyal
bf247cb56c kdump: Move network device setup in a separate function
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>
2012-05-24 13:49:21 +08:00
Dave Young
a0bc139793 remove suffix of rhcrashkernel-param.sh
Per vivek, remove the .sh suffix
2012-05-18 10:02:07 +08:00
Dave Young
ca94c80a91 add rhcrashkernel-param.sh for anaconda use
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>
2012-05-16 11:22:42 +08:00
Dave Young
70dbef8656 Resolves: bz805773
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>
2012-05-14 10:36:18 +08:00
Dave Young
e27c9f6c52 do_default_action cleanup
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>
2012-05-14 10:20:29 +08:00
Dave Young
334ded7e8b Release 2.0.3-47 2012-05-03 10:12:32 +08:00
Dave Young
bbd2e7d30a remove dracut-files.tbz2 [v2]
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
2012-05-03 10:06:05 +08:00
Dave Young
33eb910322 increase version to 2.0.3-46 2012-05-02 10:25:57 +08:00
Dave Young
425e6232ef Release 2.0.3-46 2012-05-02 10:24:23 +08:00
Dave Young
c1657d890b Merge branch 'master'; commit 'b71fc17' into f17 2012-05-02 10:15:58 +08:00
Vivek Goyal
015dd4c67c mkdumprd: Start using --hostonly and --add kdumpbase while calling dracut
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>
2012-05-02 10:08:18 +08:00
Dave Young
0e9fbaf139 get_mp function cleanup
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>
2012-05-02 10:06:58 +08:00
Dave Young
de42bcce80 move kdump script order to the end of pre pivot
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>
2012-05-02 10:06:54 +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
Dave Young
4b48dbb442 Merge branch 'f17' 2012-05-02 09:58:55 +08:00
Dave Young
82595d8f2b Release 2.0.3-45
update the dracut-files.tgz2
2012-04-23 15:59:37 +08:00
Dave Young
29a5d0629b Release 2.0.3-44 2012-04-19 13:56:15 +08:00
Dave Young
ad176c5289 update x86_64 sysconfig
Resolves: bz813711

Sync from rhel6.3 sysconfig

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-04-19 13:52:30 +08:00
Dave Young
68da2e965e deal with nic rename issue
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>
2012-04-19 13:51:46 +08:00
Dave Young
b58723d935 update ppc64 sysconfig
sync ppc64 sysconfig from rhel6 kexec-tools

Resolves: bz811449

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-04-19 13:48:50 +08:00
Cong Wang
ce7bc4cbf0 Merge branch 'f17'
Conflicts:
	kexec-tools.spec
2012-04-18 18:38:06 +08:00
Cong Wang
2347ccef79 fix version number in changelog 2012-04-11 19:36:29 +08:00
Cong Wang
7f1816b6c1 Release 2.0.2-43 2012-04-11 19:32:20 +08:00
Dave Young
7a2ab0af8c variable name fix
Resolves: bz807649

$need_dns should be $_need_dns
[v1->v2]: ChaoWang: quote "$_need_dns"
2012-04-11 19:28:53 +08:00
Cong Wang
832c25f2d6 Release 2.0.3-42 2012-03-30 11:42:14 +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
f7b9767f87 spec: depends on dracut-network
Resolves: bz807286

kexec-tools should depend on dracut-network

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-03-30 11:32:51 +08:00
Dave Young
985fcae6ec get ip addr with getent
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>
2012-03-30 11:31:48 +08:00
Cong Wang
726d9319cb Bump this version 2012-02-27 15:33:35 +08:00
Cong Wang
c7bdac9723 Upload new dracut module files 2012-02-27 15:28:27 +08:00
Cong Wang
6fdfc66acc Fixup sysytemd service file 2012-02-22 14:33:53 +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
Orion Poplawski
bdbd5c1775 Use %{_unitdir} in mkdir 2012-02-14 10:48:00 -07:00
Orion Poplawski
f441ecab60 Fixup sysytemd service file (bug 741272)
Drop chkconfig (bug 786938)
2012-02-14 10:13:06 -07:00
Cong Wang
6ffa63d416 Pull the latest makedumpfile release, 1.4.2 2012-01-27 23:10:18 +08:00
Cong Wang
481cb83cfd Add initial NFS dump support, experimental 2012-01-27 22:59:43 +08:00
Cong Wang
27fddae614 Use nr_cpus=1 instead of maxcpus=1 on x86 2012-01-25 18:44:05 +08:00
Cong Wang
782c719a4e Check the exit status of nfs mount 2012-01-25 18:42:03 +08:00
Cong Wang
f51fd99344 Really upload the dracut module this time 2012-01-25 17:21:43 +08:00
Cong Wang
c461ec7057 Fix various bugs for nfs dump 2012-01-25 16:58:35 +08:00
Cong Wang
8a14c620b7 kdump.sh cleanup for fstab handling 2012-01-25 15:25:39 +08:00
Cong Wang
2630148dc7 Handle rootfs correctly 2012-01-25 12:18:51 +08:00
Cong Wang
8e0b475887 Disable kexec_test 2012-01-21 16:56:07 +08:00
Cong Wang
c0742d742a Fix build dependency 2012-01-21 16:41:53 +08:00
Cong Wang
c74af3a721 Remove unused patches 2012-01-21 16:15:22 +08:00
Cong Wang
055c5b7189 Fix build dependency 2012-01-21 14:56:40 +08:00
Cong Wang
e494189fbb sync with the latest upstream releases 2012-01-21 12:20:35 +08:00