Commit Graph

615 Commits

Author SHA1 Message Date
Tao Liu
e1ab0275c0 Add --dry-run option to prevent writing the dumpfile
Backport from upstream.

commit 3422e1d6bc3511c5af9cb05ba74ad97dd93ffd7f
Author: Julien Thierry <jthierry@redhat.com>
Date:   Tue Nov 24 10:45:24 2020 +0000

    [PATCH 1/2] Add --dry-run option to prevent writing the dumpfile

    Add a --dry-run option to run all operations without writing the
    dump to the output file.

    Signed-off-by: Julien Thierry <jthierry@redhat.com>
    Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2021-04-28 15:45:08 +08:00
Kelvin Fan
75bdcb7399 Write to /var/lib/kdump if $KDUMP_BOOTDIR not writable
The `/boot` directory on some operating systems might be read-only.
If we cannot write to `$KDUMP_BOOTDIR` when generating the kdump
initrd, attempt to place the generated initrd at `/var/lib/kdump`
instead.

Signed-off by: Kelvin Fan <kelvinfan001@gmail.com>
Acked-by: Kairui Song <kasong@redhat.com>
2021-04-19 16:11:17 +08:00
Coiby Xu
eca7711706 Drop dependency on ipcalc
A shell equivalent of "ipcalc -m" has been implemented.

Signed-off-by: Coiby Xu <coxu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2021-04-16 18:51:52 +08:00
Kairui Song
ad655087c9 Release 2.0.21-8
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-04-05 02:33:21 +08:00
Kairui Song
91f1d5989b Update eppic to latest upstream snapshot
Also fixes a package build failure:
ar ccurl libeppic.a eppic_util.o eppic_node.o eppic_var.o eppic_func.o eppic_str.o eppic_op.o eppic_num.o eppic_stat.o eppic_builtin.o eppic_type.o eppic_case.o eppic_api.o eppic_member.o eppic_alloc.o eppic_define.o eppic_input.o eppic_print.o eppicpp.tab.o eppic.tab.o lex.eppic.o lex.eppicpp.o baseops.o
ar: eppic_util.o: file format not recognized

See eppic commit 0037321e64952b4feb3bd37761fb1067266e9e72 for more
details.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-04-05 02:08:02 +08:00
Zbigniew Jędrzejewski-Szmek
4b7ff283f5 Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:34 +01:00
Coiby Xu
2721f323a9 add dependency on ipcalc
ipcalc is needed for generating 45route-static.conf. However,
on newer Fedora, e.g. 34, dracut-network drops dependency on
dhcp-client which requires ipcalc. Make kexec-tools explicitly
depends on ipcalc.

Reported-by: Jie Li <jieli@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2021-02-09 17:52:50 +08:00
Kairui Song
7232f5bff2 Release 2.0.21-6
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-02-08 23:22:14 +08:00
Fedora Release Engineering
7a0d2aaed5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 15:28:37 +00:00
Kairui Song
33108ef524 Release 2.0.21-4
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-22 15:54:11 +08:00
Kairui Song
550f1c4285 Release 2.0.21-3
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-20 14:38:54 +08:00
Kairui Song
24c6b3027f Merge #4 Make dracut-squash a weak dep 2021-01-10 19:18:23 +00:00
Kairui Song
fc70351852 Fix a date error in the change log 2021-01-08 11:15:24 +08:00
Kairui Song
ae142da0a6 Release 2.0.20-2
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-08 11:08:05 +08:00
Kairui Song
0e540f7328 makedumpfile: make use of 'uts_namespace.name' offset in VMCOREINFO
Backports:

commit 54aec3878b3f91341e6bc735eda158cca5c54ec9
Author: Alexander Egorenkov <egorenar@linux.ibm.com>
Date:   Fri Sep 18 13:55:56 2020 +0200

    [PATCH] make use of 'uts_namespace.name' offset in VMCOREINFO

    * Required for kernel 5.11

    The offset of the field 'init_uts_ns.name' has changed since
    kernel commit 9a56493f6942 ("uts: Use generic ns_common::count").
    Make use of the offset 'uts_namespace.name' if available in
    VMCOREINFO.

    Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-08 11:05:05 +08:00
Tom Stellard
872d6b36de Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-05 22:46:03 +00:00
Kairui Song
7cb4be80cd Release 2.0.20-1
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-12-23 17:41:43 +08:00
Kairui Song
1d5d39f3d4 makedumpfile: printk: use committed/finalized state values
commit 44b073b7ec467aee0d7de381d455b8ace1199184
Author: John Ogness <john.ogness@linutronix.de>
Date:   Wed Nov 25 10:10:31 2020 +0106

    [PATCH 2/2] printk: use committed/finalized state values

    * Required for kernel 5.10

    The ringbuffer entries use 2 state values (committed and finalized)
    rather than a single flag to represent being available for reading.
    Copy the definitions and state lookup function directly from the
    kernel source and use the new states.

    Signed-off-by: John Ogness <john.ogness@linutronix.de>

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-12-23 17:27:10 +08:00
Kairui Song
71e1c651dd makedumpfile: printk: add support for lockless ringbuffer
Backports:

commit c617ec63339222f3a44d73e36677a9acc8954ccd
Author: John Ogness <john.ogness@linutronix.de>
Date:   Thu Nov 19 02:41:21 2020 +0000

    [PATCH 1/2] printk: add support for lockless ringbuffer

    * Required for kernel 5.10

    Linux 5.10 introduces a new lockless ringbuffer. The new ringbuffer
    is structured completely different to the previous iterations.
    Add support for retrieving the ringbuffer from debug information
    and/or using vmcoreinfo. The new ringbuffer is detected based on
    the availability of the "prb" symbol.

    Signed-off-by: John Ogness <john.ogness@linutronix.de>
    Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-12-23 17:26:11 +08:00
Kairui Song
6be14c2bcd Release 2.0.20-21
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-11-30 17:02:40 +08:00
Kairui Song
7d861422fa Rebase makedumpfile to 1.6.8
makedumpfile have moved to Github, so update the upstream URLs.
2020-11-30 16:48:02 +08:00
Kairui Song
4f492cf73e Release 2.0.20-20
Also fix some changelog issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-11-19 00:38:23 +08:00
Kairui Song
bfd06661e8 Release 2.0.20-19
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-11-05 01:11:32 +08:00
Jonathan Lebon
c9a0df1ccb Make dracut-squash a weak dep
The dracut module is opportunistic about using the built-in squashfs
support only when available, but the spec file hard requires it. Demote
it to a weak dep to truly make it optional.

This caters to environments which strive to stay minimal, like FCOS and
RHCOS. See https://github.com/coreos/fedora-coreos-config/pull/708 for
details.
2020-10-28 16:36:05 -04:00
Lianbo Jiang
3b743ae6ae enable the logger for kdump
Since the logger was introduced into kdump, let's enable it for kdump
so that we can output kdump messages according the log level and save
these messages for debugging.

Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-10-27 17:33:54 +08:00
Kairui Song
3d5d9f0c0f Release 2.0.20-18
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-08-27 13:14:59 +08:00
Kairui Song
a7199c141c Add a kernel install hook to clean up kdump initramfs
Kdump service will create kdump initramfs when needed, but it won't
clean up the kdump initramfs on kernel uninstall. So create a kernel
install hook to do the clean up job.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2020-08-27 11:22:03 +08:00
Kairui Song
f8f8d79d7f Release 2.0.20-17
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-08-04 10:50:46 +08:00
Kairui Song
d0d9ff1eb2 Drop static lib dependencies
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-08-04 10:47:51 +08:00
Fedora Release Engineering
21b4996e3a - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 03:43:49 +00:00
Fedora Release Engineering
1844d088f7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 03:00:49 +00:00
Pingfan Liu
8bef2d943b kexec-tools.spec: make the existence of pre.d and post.d mandatory
If the directory /etc/kdump/pre.d is optional, then it is hard
to tell between the following cases:
  -1. no directory "/etc/kdump/pre.d"
  -2. "rm -rf /etc/kdump/pre.d", which removes all scripts under pre.d
For the second case, kdump.img should be rebuilt.

To bail out from this corner case, always creating pre.d and post.d
during rpm installation.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-07-20 16:12:04 +08:00
Kairui Song
070d362846 Release 2.0.20-14
Also fix a timestamp issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-07-01 17:15:38 +08:00
Kairui Song
e05c550144 Drop switch root capability for non fadump initramfs
Switch root is never used for kdump image, and this will be helpful to
reduce the initramfs size.

Also increase dracut dependency version and the function is
dracut_no_switch_root is new introduced.

This commit is applied to RHEL some time ago, but missing in Fedora as
Fedora's Dracut didn't backport this feature at that time. Now apply
this missing commit.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
2020-06-10 22:37:34 +08:00
Pingfan Liu
47bdeee35d fadump-howto.txt: source it in spec file
Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-06-03 11:34:37 +08:00
Kairui Song
cfd93e2b7e Revert "Add a hook to wait for kdump target in initqueue"
This reverts commit cee618593c.

Upstream dracut have provided a parameter for adding mandantory network
requirement by appending "rd.neednet" parameter, so we should use that
instead.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2020-05-28 16:26:00 +08:00
Kairui Song
0094fb496d Release 2.0.20-13
Add support for using unmounted device as dump target, update docs, and
fix several known issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-05-22 19:29:19 +08:00
Kairui Song
b5b252ae27 Release 2.0.20-12
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-04-02 01:48:46 +08:00
Kairui Song
4b43ba063d Release 2.0.20-11
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-03-24 01:47:45 +08:00
Kazuhito Hagio
476a2b50f6 makedumpfile: Introduce --check-params option
Backport from the upstream makedumpfile devel branch.

commit 989152e113bfcb4fbfbad6f3aed6f43be4455919
Author: Kazuhito Hagio <k-hagio-ab@nec.com>
Date:   Tue Feb 25 16:04:55 2020 -0500

    [PATCH] Introduce --check-params option

    Currently it's difficult to check whether a makedumpfile command-line
    is valid or not without an actual panic.  This is inefficient and if
    a wrong configuration is not tested, you will miss the vmcore when an
    actual panic occurs.

    In order for kdump facilities like kexec-tools to be able to check
    the specified command-line parameters in advance, introduce the
    --check-params option that only checks them and exits immediately.

    Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-03-12 23:32:18 +08:00
Kairui Song
16d2e4274d Release 2.0.20-10
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-02-13 16:19:54 +08:00
Kairui Song
1b89cc245f Release 2.0.20-9
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 14:44:16 +08:00
Kairui Song
47f2a819d5 Fix builing failure on Fedora 32
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 14:43:47 +08:00
Kairui Song
71d20dc825 Release 2.0.20-8
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 08:48:04 +08:00
Kairui Song
69b920db5d Update makedumpfile to 1.6.7
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 08:47:42 +08:00
Kairui Song
cee618593c Add a hook to wait for kdump target in initqueue
The dracut initqueue may quit immediately and won't trigger any hook if
there is no "finished" hook still pending (finished hook will be deleted
once it return 0).

This issue start to appear with latest dracut, latest dracut use
network-manager to configure the network,
network-manager module only install "settled" hook, and we didn't
install any other hook. So NFS/SSH dump will fail. iSCSI dump works
because dracut iscsi module will install a "finished" hook to detect if
the iscsi target is up.

So for NFS/SSH we keep initqueue running until the host successfully get
a valid IP address, which means the network is ready.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
2020-01-29 08:12:45 +08:00
Kairui Song
d01c6de338 Release 2.0.20-7
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-12-29 19:36:08 +08:00
Kairui Song
b301d6c4f4 Fix building failure due to makedumpfile's compile flag
From: Pingfan Liu <piliu@redhat.com>

makedumpfile: remove -lebl

-lebl has been removed from elfutils.

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-12-28 03:12:27 +08:00
Kairui Song
ee742fcf6b Release 2.0.20-6
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-11-28 17:53:30 +08:00
Pingfan Liu
d9d4483b7a spec: move binaries from /sbin to /usr/sbin
Before this patch
$rpm -ql kexec-tools | grep sbin
/sbin/kexec
/sbin/makedumpfile
/sbin/mkdumprd
/sbin/vmcore-dmesg

After this patch
$rpm -ql kexec-tools | grep sbin
/usr/sbin/kexec
/usr/sbin/makedumpfile
/usr/sbin/mkdumprd
/usr/sbin/vmcore-dmesg

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-11-08 15:23:33 +08:00