Commit Graph

411 Commits

Author SHA1 Message Date
Dave Young
9e81dab151 Update 3 po files:
po/gu.po
po/or.po
po/zh_CN.po

These translations missed one '\n' so build fails with:
msgfmt --statistics --verbose -o gu.mo gu.po
gu.po:73: `msgid' and `msgstr' entries do not both begin with '\n'

Fix them by adding one more "\n"
2012-12-21 11:14:47 +08:00
Dave Young
f9171d8a4d Release 2.0.3-62 2012-12-21 10:45:32 +08:00
Dave Young
f31de732e6 Update sources 2012-12-21 10:45:07 +08:00
Dave Young
28df2c1f6f Pull translated po files from zanata 2012-12-21 10:39:52 +08:00
Baoquan He
4590f6e33b Optimize redundent code fetching server of network dump
Code in function kdump_install_net used to get server of network dump
is is a little redundent, can be optimized into one line. For nfs/ssh,
this line of code is enough.

Test passed on local kvm guest with Fedora 18.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2012-12-14 17:23:46 +08:00
Baoquan He
3be6c1228e change the dump dir format to be more readable
Resolves: bz880551

Currently on fedora directory name of kdump is like 14.11.12-03:40:30.
It's not as readable as RHEL6. The old format of dir is host_ip-date-time.
This patch changes it back like ole one as below.
192.168.122.234-2012-10-31-05:17:20

If can't get HOST_IP for a network kudmp, we just fail. Becasue most
likely any attempt to save dump will also fail.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2012-12-14 17:23:09 +08:00
Dave Young
3f0ba9aab7 Release 2.0.3-61 2012-12-12 17:17:07 +08:00
Dave Young
22dcf44cf4 firstboot:fix reserve mem ui spinbox step size
Currently the gtk spinbox use 64M as the spin step size, this means user
can only reserve memsize round down to 64M. But in fact user can simply
input the value which is not aligned to step size in the text entry. Also
user can use any value from kernel boot cmdline. Thus it will cause problem:
For example, booting with crashkernel=138M, firstboot spinbox will round down
it to 128M, and show 128M in spinbox value, but actualy reserved label will
show 138M, they are not consistent and confusing.

We have lowerBound value which is 128M, there's no reason to limit the increase
step as 64M, fix this by changeing the step to 1M.

Tested with fedora 18 for different values.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-12-12 17:15:10 +08:00
Dave Young
f21cbb5165 handle readonly mounted filesystem
We need fs dump target being mounted firstly before creating mkdumprd
This is because we want to get the mount options from kernel mountinfo
instead of simply mount it without considering mount options.

To avoid the filesystem being used by something other than kdump we
suggest them to mount it as 'ro', mkdumprd will remount it as 'rw' when
necessary and remount it back to 'ro'

In 2nd kernel kdump will still use 'rw' to mount it though.

Tested local read-only mounted fs dump.

[v1->v2]: improve documentation
          add error handling for `mount -o remount,ro`

Fixed the changelog per Vivek's comment
The code was reviewed by Vivek.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-12 17:13:54 +08:00
Dave Young
b30fee648c Release 2.0.3-60 2012-12-10 13:56:44 +08:00
Dave Young
58ac6739fa Update sources 2012-12-10 13:53:55 +08:00
Dave Young
7635d4f5db makedumpfile 1.5.1 2012-12-10 13:43:00 +08:00
Dave Young
53ee0e93a5 Update po tar.gz 2012-12-05 01:33:49 -05:00
Dave Young
d0e268c1ae Add a notes for zanata process 2012-12-05 01:23:09 -05:00
Dave Young
5ae99122af Add two xmls file for po zanata translation
pom.xml for maven client
zanata.xml for kexec-tools zanata project
2012-12-05 01:19:12 -05:00
Dave Young
7f92db4f60 Cleanup and recreate po files
Resolves: bz859783

Old po/ folder are not well maintained. All po files are just
same as the outdated pot file.

Translating team need kexec-tools to update it to
the conventional mode so it become available for translating.

Currently old translated po files are not maintained in git.
Instead it's a kexec-tools-po.tar.gz in dist git server.
see kexec-tools.spec: Source13. This patch will maintain them
in po/ and update the contents from lastest source code.

The refresh include below items:
1. update pot file from latest source code.
2. merge old translated po files with the new pot file
3. maintain translated po files in po/ folder
Also updated the Makefile to make the process more easier.

Usage after the update is like below:
a) simple `make` will generate the mo files for installation
b) `make install` will install mo files to locale directory
Above two command are used in rpm spec to install mo files

c) `make merge` will update pot file from source code and merge
translated po files with latest pot file. So it become ready for
translation team to translate

For kexec-tools maintaining, what we need to do is:
Once firstboot_kdump.py is modifed, we should run `make merge`
to update the po files for translation
After po files get translated they need to be copied to po/
and commit to git. Then create a kexec-tools-po.tar.gz and
upload the tar.gz to dist git, also update the checksum in spec
file.
2012-11-30 17:34:16 +08:00
Dave Young
3b4929edb3 Release 2.0.3-58 2012-11-16 14:20:12 +08:00
dyoung@redhat.com
2c20a30420 Enable kdump service after installation
Kdump systemd service should be enabled after installation like what
we do for old sysv init service.

systemctl enable will do daemon-reload automaticlly, so no need to
reload the daemon again. Please see manpage of systemctl about the detail.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-11-16 14:17:06 +08:00
dyoung@redhat.com
c616b97dfb get MEM_RESERVED from sysfs attribute
Resolves: bz866357

MEM_RESERVED is for checking if crash memory is reserved or not.
Originally it use /proc/iomem for x86, parsing /proc/cmdline for ppc.
This cause problems for crashkernel=auto, because it does not fit for
the regular expression of [0-9]\+[MmKkGg]@[0-9]\+[MmGgKk]

Fix this by use /sys/kernel/kexec_crash_size for all arches.
After the fix the code is more clear than before.

[v1->v2] vivek: add space between "crash kernel"; remove misleading warning.

Tested-by: Chao Wang <chaowang@redhat.com>
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-11-16 14:14:35 +08:00
dyoung@redhat.com
4d9bb7face get_ssh_size: use -n to redirect stdin from /dev/null
Resolves: bug 868990

ssh will send local stdin input to remote side, this cause trouble
when we call ssh in the loop of parsing kdump.conf.

Ie. if we specify both 'ssh' and 'core_collector' option in kdump.conf,
and put 'core_collector' behind 'ssh', there will be no chance to
handle 'core_collector' because in get_ssh_size() ssh eat all the later
input of the while loop.

Fix this by use /dev/null as stdin in get_ssh_size().

Tested in fedora kvm guest.

Signed-off-by: Dave Young <dyoung@redhat.com>
Suggested-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-11-16 14:13:27 +08:00
Dave Young
c5c4a7b8b0 add random feeding code for ssh dump
ssh: add random feeding code

openssh usually depends on /dev/urandom to seeding PRNG (pseudo-random number
generator). To ensure there's sufficient entropy just feed /dev/urandom with
saved /var/lib/random-seed which is saved in installing phase.

dracut_install will print error message, so just exit and do not print error
again.

Todo: other dracut_install fail and exit, such as dd, makedumpfile.

[v2->v3]: use [[:blank:]] for whitespace checking.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-11-16 14:07:52 +08:00
Dave Young
f3914a98a6 kdump option space checking improvement
We can use not only space but also tab as whitespace,
so s/\ /[[:blank:]] for checking the whitespace

The last commit is intend for checking multiple dump target,
and differentiate ssh and sshkey options. This issue is only
for ssh, so no need to add [[:blank:]] for other dump types to
create a very long code line.

[v1->v2]: use [[:blank:]] instead of [[:space:]]
see expanation in below doc:
http://en.wikipedia.org/wiki/Regular_expression#POSIX_character_classes
[:blank:] 	[ \t] 	Space and tab
[:space:]	[ \t\r\n\v\f] 	Whitespace characters

Tested the [:blank:] works well as [:space:]

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
CC: Cong Wang <amwang@redhat.com>
2012-11-16 14:06:26 +08:00
Dave Young
d17cf94ea9 kdumpctl: multi dump target checking fix
Resolves: bz867703

For both ssh and sshkey specified in kdump.conf, we will error out:
[..]
+ start
+ local nr
++ awk 'BEGIN{cnt=0} /^raw|^ssh|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' /etc/kdump.conf
+ nr=2
+ '[' 2 -gt 1 ']'
+ echo -n 'Error: More than one dump targets specified'
Error: More than one dump targets specified+ echo

Fix this by Improving the patterns for multi dump targes checking
with one more space.

Thanks ChaoWang for catching this and providing the fix.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-11-05 16:55:15 +08:00
Dave Young
0f8bd150db Release kexec-tools-2.0.3-58 2012-10-25 17:33:26 +08:00
Dave Young
1cbfc5626e Pull two patches from upstream
bz865162
Someone need this for kexec to load memdisk which is smaller then 32k.
kexec-tools-2.0.3-Load-bzImages-smaller-than-32-KiB.patch

bz849650, for efi booting system we need this acpi_rsdp kernel argument
after vivek's secure boot work we maybe need drop this one.
kexec-tools-2.0.3-kdump-pass-acpi_rsdp-to-2nd-kernel-for-efi-booting.patch
2012-10-25 17:07:19 +08:00
Dave Young
c248af077b Release 2.0.3-57 2012-10-11 09:47:25 +08:00
Dave Young
fca70aadfd improve persistent name handling
For devices with filesystem, udev /dev/disk/by-uuid/* links are usually
reliable. But one exception is multipath devices, child and top layer
device may have same uuid.

As dm devices maintain /dev/mapper/* as persistent names, so converting to
/dev/mapper/* firstly then try by-uuid/* and by-id/*

Also because user know better what's the persistent name we just document well
to suggest user use persistent name in kdump.conf. it's suggested to
to use lvm or multipath canonical names or uuid/label.

Updated kdump.conf examples and related chunks in kexec-kdump-howto.txt
use lvm /dev/vg/<devname> in examples

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-10-11 09:43:30 +08:00
Dave Young
3c2d53ebfd Release 2.0.3-56 2012-09-29 13:24:17 +08:00
Dave Young
7468d46e9c Pull vmcore-dmesg patches from vivek
Add below two commits from upstream:
1.
commit c96e7736d85e40685939011e6d51b3c0a28739a3
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Wed Jul 18 09:33:51 2012 -0400

    vmcore-dmesg: Do not write beyond end of buffer

    scan_vmcoreinfo() currently assumes that every vmcoreinfo note line ends
    with \n and overwrites new line with \0. But last entry in note, CRASHTIME=
    does not end with \n and this leads to corrupting memory as we write beyond
    end of buffer.

    Normally things were fine but when I added some fields to vmcoreinfo, this
    bug started showing and vmcore-dmesg started crashing.

    I am planning to send a patch to fix this in kernel but it might be good
    idea to handle this case in user space too so that vmcore-dmesg works
    fine with cores of older kernels.

    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
2.
commit df88cab364cd1a3b8c992042d62efe5e350e6b2a
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Mon Jul 30 13:32:48 2012 -0400

    vmcore-dmesg: vmcore-dmesg: Make it work with new structured logging format

    Now kernel has made kernel logging structured and exsisting vmcore-dmesg
    does not work with this new format. Hence kernel version 3.5 is broken. In
    3.6 now a kernel patch has been put which exports relevant fields. This
    patch parses those fields and makes vmcore-dmesg work with new logging
    format.

    Currently it does not display log levels or dictionary. I personally think
    that log levels are not very useful and it also requires additional kernel
    patches so that log levels are not bitfields and relevant information is
    exported to user space properly.

    Concept of dictionary is new and relevant information is exported. One can
    possibly enahnce vmcore-dmesg to also print dictionary contents based on
    a user command line option.

    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
2012-09-29 13:19:03 +08:00
Dave Young
65e3922d80 ppc/ppc64: compile purgatory with gcc option msoft-float
Resolves: bz831015

add below patch from vivek for upstream.
commit d40badaa2553c44d0585df335ad7e1c465f8ced1
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Fri Jun 8 09:43:15 2012 -0400

    ppc/ppc64: Compile purgatory code with gcc option -msoft-float

Verified-by: Lingzhu Xiang <lxiang@redhat.com>
Acked-by: Cong Wang <amwang@redhat.com>
2012-09-29 13:15:36 +08:00
Dave Young
db95ae35e8 Update to support f18 grub2 efi config file
F18 switch to use grub2 for efi booting, add the config files
to bootloaders array.

Tested with F18 alpha.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-29 09:59:55 +08:00
Dave Young
4ff4287ce7 pass persistent name to dracut --device
For raw device dump, also pass persistent name to dracut --device to fix
the device renaming problem.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-20 11:03:24 +08:00
Dave Young
9d161703a6 pass persistent name to dracut --mount
currently --mount param are retrieved from /proc/mounts, but the device
name could be renamed in initramfs. So here convert them to persistent
names before passing to dracut

lvm canonical dev name is /dev/mapper/lvname-link which will be showed
in /proc/mounts
here fix get_mp function by using findmnt utils to find the mount point.

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

[chaowang]:
in case device is not mounted we should not echo the mount line in to_mount()
use findmnt -n to strip the header line
for nfs don't pass persistent name to dracut
[vivek]:
improve variable names

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-20 11:03:19 +08:00
Dave Young
7de0cc4a92 use persistent name in kdump.conf of initramfs
In initramfs we should use persistent name created by udev to avoid
device rename issue.

fix by using udev persistent name when we copy the kdump.conf

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-20 11:03:14 +08:00
Dave Young
fea5fd770f mkdumprd: add function get_persistent_dev
Copy the function get_persistent_dev from dracut for us to handle the
persistent name issues.
[vivek] add error handling for get_persistent_dev

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-20 11:03:09 +08:00
Dave Young
7f9d4f917a remove useless uuid and label handling
When we intall kdump.conf to initramfs we have converted the UUID and LABEL
to device name. So in initramfs these convert code is not used indeed.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-20 11:03:04 +08:00
Dave Young
9171cb3020 Release 2.0.3-55 2012-09-06 15:49:58 +08:00
Dave Young
1fbb5a69b4 pull makedumpfile 1.5.0 2012-09-06 15:39:58 +08:00
Dave Young
ffc5ece53b Resolves: bz808299
Copy comments from the bz:
In rhel7 onwards, we will require dump target filesystem to be mounted in first kernel so that kdump can make use of same mount options instead of trying to come up with its own mount options. This should make mounting that file system safer. Also it reduces complexity in kdump code.

That will mean one needs to put an entry for the dump file system in /etc/fstab
so that after reboot when kdump service starts, it can find the dump target and build initramfs instead of failing.
2012-08-31 10:05:37 +08:00
Dave Young
d965a9e105 The example of nfs dump config option is wrong.
s/net/nfs

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-31 10:04:54 +08:00
Dave Young
1053f9b7d2 Release 2.0.3-54 2012-08-29 09:44:56 +08:00
Dave Young
5f68617954 pass raw device as dracut argument
For raw device upon complex storage such as multipath and iscsi
dracut does not resolve the module dependency automaticlly,
I sent a patch for the device pass via dracut argument "--device"
see below for reference:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2836

Add --device <device> in mkdumprd for raw dump to fix this issue.

Testing:
raw dump on iscsi targets.

Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: Chao Wang <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-29 09:42:18 +08:00
Dave Young
679b4216fa iscsi setup fix
Original host_fs_types could only contain one iscsi slave,
This is due to the check_block_and_slaves will return once the helper function
return TRUE, so only one slave with fs type will be added to host_fs_types[]
Thus, there will no chance to setup other slaves in kdump iscsi setup routine.

Use for_each_host_dev_and_slaves_all to setup all slaves.

Tested by chaowang and myself.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-29 09:42:00 +08:00
Dave Young
e02ec8b7e8 firstboot: add automatic and manual memory reservation for rhel
Add two radiobuttons for user to select automatic/manual memory reserve
For fedora they will not be added.

When switching from manual configure to auto reserve, the memory size and
summary widgets will be dimmed.

Testing below cases on virtual machine, all cases need reboot and verify:
Fedora:
1. Enable/Disable kdump
2. change reserve size
3. change kdump.conf content
4. Auto -> Manual
5. Manual -> Auto

RHEL:
modify the /etc/redhat-release and install the rhel7 kernel rpm in fedora vm.
1. auto reservation
2. manual specify reserve mem size
3. enable/disable kdump
4. change kdump.conf content

Vivek: label with text "Memory To Be Reserved"

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-28 16:22:35 +08:00
Dave Young
97aea9a995 firstboot: remove unnecessary underline shortkey
The '_' before UI string is for Alt+TheFirstCharacter shortkey
ie. Press Alt+T will focus on the self.totalMem widget.

But the totalMem and systemUsableMem are not configurable, so
this is in fact unnecessary. OTOH, The 'Alt+T' will be used in later
patches, so remove these two here.

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-28 16:22:25 +08:00
Dave Young
dc5f48e90a firstboot: fix gtk warning about non-zero page size
Pygtk documentation says the page size field is not used, but actually
there will be a gtk warning below:

/usr/share/firstboot/modules/firstboot_kdump.py:216: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.kdumpMemspin = gtk.SpinButton(self.memAdjustment, 0, 0)

Fix it by setting the last field to 0.

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-28 16:22:15 +08:00
Dave Young
ed4d7a3865 firstboot: update all kernels config in grubbyCmd
Per vivek, update all kernels configs in grub config file make more sense.

use --update-kernel=ALL to update all grub entries.

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-28 16:22:11 +08:00
Dave Young
caf1c13f53 firstboot: add actual reserved memory widget
Memory reservation could fail, so add a new widget to show the
actual reserved size. If crashkernel is set but reserved size is
0, we still regard kdump is enabled, the actual reserved widget
just show the reservation status.

vivek: label with text "Memory Currently Reserved"

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-28 16:22:06 +08:00
Dave Young
1c9add2a5f firstboot code cleanup
variables and code cleanup
For example, below variables are changed:
kdumpMem -> kdumpMemspin
memSpin -> memAdjustment
remMem -> remainingMem
resMem -> reserveMem
kdumpMem -> reservedMem

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
2012-08-28 16:21:55 +08:00
Dave Young
864fb123f8 rhcrashkernel-param: echo crashkernel=auto for rhel7
Per discussion in kdump meetint, add crashkernel=auto to rhcrashkernel-param
script for rhel7 for testing. Anaconda will call this script to add the cmdline
instead of hardcode it.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-08-20 15:01:47 +08:00