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"
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>
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>
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>
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>
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>