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.
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
Fedora firstboot will alert about requiring a kernel-kdump
for x86, this is not true. In fact all arches what we support
do not depend on kernel-kdump any more.
Thus remove the kernel-kdump handling in firstboot.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
elilo is deprecated in fedora, so remove the elilo support in firstboot module.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
Update to use grub2, also update the config file names
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
Copying something from old bug 688150:
Steps to Reproduce:
1.Go through FirstBoot process while get to Kdump
2.Change Kdump memory
3.Press Finish
4.A window pops-up (Changing Kdump setting requires ...)
5.Do not press "No" or "Yes" but pres the "X" in the right up corner.
Actual results:
The effect of this action is the same as pressing "YES"
Expected results:
The effect of this action is the same as pressing "NO
So this patch fix to only reboot when rc == gtk.RESPONSE_YES.
Port from below patch from rhel:
commit ed0c89d8e42b9205671cb6c81f9f73c275bee72f
Author: amwang <amwang@redhat.com>
Date: Thu Mar 17 10:07:52 2011 +0000
Resolves: bug 688150.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
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>
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>
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>
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>
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>
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>