feat: Add kexec-tools crashkernel configuration for mkconfig flow (#6281)

This commit is contained in:
Cameron E Baird 2023-12-07 13:52:33 -08:00 коммит произвёл GitHub
Родитель 9405633a3f
Коммит 93a96b7c15
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 56 добавлений и 38 удалений

Просмотреть файл

@ -0,0 +1 @@
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX crashkernel=512M-32G:256M,32G-:512M"

Просмотреть файл

@ -1,38 +1,39 @@
{
"Signatures": {
"98-kexec.rules": "c4e3768d55cf3c6e617670f22d4e6f0e0bbc13c278a6c6fba88533f6a25106b8",
"dracut-early-kdump-module-setup.sh": "f819b213de84fda98b2859af7c7beaa8e6aa92400106751dc5e73a878699bae4",
"dracut-early-kdump.sh": "615a5497d1c586796ad2163d174f74b151b1dbaa87597a64e5e24727dc4ae2e0",
"dracut-kdump-capture.service": "e29e6e34a69281d6f149ef08fee7b6f8f79ae3911a0ffaf233cabe6898307f4b",
"dracut-kdump-emergency.service": "38c89025ea2856ef3d66aa18623728e0b7dbf9d8ce5b23e733fddb6361337ea7",
"dracut-kdump-emergency.target": "75d3637d8829009015f9ac0b6b2b93b260f6700f3bf930155080906b696d4720",
"dracut-kdump-error-handler.service": "d5cd3a6cce04955a07ae5cd7790ae17365b90a4989f1888d7b7f487316a1544d",
"dracut-kdump-error-handler.sh": "23bb509940a9ecc3944bb88526b974f49cfb7d6c133fe11615d8d4604141e4c9",
"dracut-kdump.sh": "0aef51b237b0d1fb7eed6a5eea2fd1d81d251d6ecb084a57b5070224cab0315c",
"dracut-module-setup.sh": "b7f8a4a573e5a424591825f25ea91ab8a995cd8f8d0c28e2b549a3dae83cb627",
"dracut-monitor_dd_progress": "2e343a54c032f6af0d5f7b5fb49f2d90057b2a234625fe7ee6c1afb21cb5c435",
"early-kdump-howto.txt": "984d51f3d9e7f2f858ef153418190c470bf20ee702c97fe34285c6d05078999c",
"eppic-e8844d3.tar.gz": "5bf3fce09fc880a96cbc0cbb3eadcae1892d7fd43350a585f150b1cce176b128",
"fadump-howto.txt": "b9090c3e0e26b6124a0c8b0c79a7adf10637c9bbc34e0a59529e3f1b66c074f0",
"kdump-dep-generator.sh": "f660e26df9c4843340093a294bcd41a68a71cea48314b5d1a3553bba5038bbbc",
"kdump-in-cluster-environment.txt": "50784977e2c3a425ae00de4831f9fd4fb4a04574db1a72b9b28f7c0979a52564",
"kdump-lib-initramfs.sh": "ff4b63f99470ee796fd7e4a532dde241c4da02909306926a08a172457775a92a",
"kdump-lib.sh": "3d50507626d4a92b8448c7d6604923f6f460c4cb5c8b18977381a7d5e516dfba",
"kdump-udev-throttler": "125d538a59172f779b40ea32fea1e4eb50d849f25eb2537a48328d4401136679",
"kdump.conf": "79800851142001c87d900a5afba163e73f1b961ce1cadafffb9306904bef73c9",
"kdump.conf.5": "bab6c7b171f76e8c6df91bb7db852815caacbc3cd3d4309a1dc58d36950440e4",
"kdump.service": "ed8d22fafa6cfafaddcfd9fec82e3fa7fa42aa0366f69676fafa97e200b0506a",
"kdump.sysconfig": "d03a24659c08aa4ce5a8e54edbe64e149f8c572c76c4e338d84dbdfbeab8fb63",
"kdump.sysconfig.aarch64": "a829f3a0f88d983ccec2782b048f12a2eafca71aac4dd42acac2eaea8f7dd8d9",
"kdump.sysconfig.i386": "1175bcc11be49841d4b8c3f9612e68bb7b2e0e8f00067ffa782fd9dba04f821d",
"kdump.sysconfig.x86_64": "850b3be780165d0721edb8d34b2ba28aafc60b29850ff627daf04190369e359c",
"kdumpctl": "d511b5db0ea2de014fb06ec9fa0a6a4fdf508a3ba6c0d73344870f245ebd4c23",
"kdumpctl.8": "025a39d212eed0584da7c23c1bb50d6ab797a0fa3c686ac6b80391af875dbaec",
"kexec-kdump-howto.txt": "e783390a9aa582a2b5e7981cd3277081385340b5873a3f0633c789811876eccb",
"live-image-kdump-howto.txt": "465a7ce28ecd9ff8f8c22ebfb17bbbafd01a52d81134be1203ee753856e4c37c",
"makedumpfile-1.6.8.tar.gz": "85d79b7090e9a8ce0d426795d3bc1de2858def7e12954d9bc6ae03de160b694c",
"mkdumprd": "ebe0cbd1152d9db3333357e898685854c7667d4c6d9df4c79196ab1e7294dad2",
"mkdumprd.8": "c2e85b4f28cfda870a8d7b4dec656a0bc88895e4b138e9bc4cf756ff7f839bcf",
"kexec-tools-2.0.27.tar.xz": "38d78bcfa33a88928324b57dc81f50c1dfc279eede45e80957ca18f4e84b8187"
}
}
"Signatures": {
"51_kexec_tools.cfg": "58c706bde0d87e96c4a53b921994c1dbf0d5a57fa1c8ae1b7f7b20da9befcc4d",
"98-kexec.rules": "c4e3768d55cf3c6e617670f22d4e6f0e0bbc13c278a6c6fba88533f6a25106b8",
"dracut-early-kdump-module-setup.sh": "f819b213de84fda98b2859af7c7beaa8e6aa92400106751dc5e73a878699bae4",
"dracut-early-kdump.sh": "615a5497d1c586796ad2163d174f74b151b1dbaa87597a64e5e24727dc4ae2e0",
"dracut-kdump-capture.service": "e29e6e34a69281d6f149ef08fee7b6f8f79ae3911a0ffaf233cabe6898307f4b",
"dracut-kdump-emergency.service": "38c89025ea2856ef3d66aa18623728e0b7dbf9d8ce5b23e733fddb6361337ea7",
"dracut-kdump-emergency.target": "75d3637d8829009015f9ac0b6b2b93b260f6700f3bf930155080906b696d4720",
"dracut-kdump-error-handler.service": "d5cd3a6cce04955a07ae5cd7790ae17365b90a4989f1888d7b7f487316a1544d",
"dracut-kdump-error-handler.sh": "23bb509940a9ecc3944bb88526b974f49cfb7d6c133fe11615d8d4604141e4c9",
"dracut-kdump.sh": "0aef51b237b0d1fb7eed6a5eea2fd1d81d251d6ecb084a57b5070224cab0315c",
"dracut-module-setup.sh": "b7f8a4a573e5a424591825f25ea91ab8a995cd8f8d0c28e2b549a3dae83cb627",
"dracut-monitor_dd_progress": "2e343a54c032f6af0d5f7b5fb49f2d90057b2a234625fe7ee6c1afb21cb5c435",
"early-kdump-howto.txt": "984d51f3d9e7f2f858ef153418190c470bf20ee702c97fe34285c6d05078999c",
"eppic-e8844d3.tar.gz": "5bf3fce09fc880a96cbc0cbb3eadcae1892d7fd43350a585f150b1cce176b128",
"fadump-howto.txt": "b9090c3e0e26b6124a0c8b0c79a7adf10637c9bbc34e0a59529e3f1b66c074f0",
"kdump-dep-generator.sh": "f660e26df9c4843340093a294bcd41a68a71cea48314b5d1a3553bba5038bbbc",
"kdump-in-cluster-environment.txt": "50784977e2c3a425ae00de4831f9fd4fb4a04574db1a72b9b28f7c0979a52564",
"kdump-lib-initramfs.sh": "ff4b63f99470ee796fd7e4a532dde241c4da02909306926a08a172457775a92a",
"kdump-lib.sh": "3d50507626d4a92b8448c7d6604923f6f460c4cb5c8b18977381a7d5e516dfba",
"kdump-udev-throttler": "125d538a59172f779b40ea32fea1e4eb50d849f25eb2537a48328d4401136679",
"kdump.conf": "79800851142001c87d900a5afba163e73f1b961ce1cadafffb9306904bef73c9",
"kdump.conf.5": "bab6c7b171f76e8c6df91bb7db852815caacbc3cd3d4309a1dc58d36950440e4",
"kdump.service": "ed8d22fafa6cfafaddcfd9fec82e3fa7fa42aa0366f69676fafa97e200b0506a",
"kdump.sysconfig": "d03a24659c08aa4ce5a8e54edbe64e149f8c572c76c4e338d84dbdfbeab8fb63",
"kdump.sysconfig.aarch64": "a829f3a0f88d983ccec2782b048f12a2eafca71aac4dd42acac2eaea8f7dd8d9",
"kdump.sysconfig.i386": "1175bcc11be49841d4b8c3f9612e68bb7b2e0e8f00067ffa782fd9dba04f821d",
"kdump.sysconfig.x86_64": "850b3be780165d0721edb8d34b2ba28aafc60b29850ff627daf04190369e359c",
"kdumpctl": "d511b5db0ea2de014fb06ec9fa0a6a4fdf508a3ba6c0d73344870f245ebd4c23",
"kdumpctl.8": "025a39d212eed0584da7c23c1bb50d6ab797a0fa3c686ac6b80391af875dbaec",
"kexec-kdump-howto.txt": "e783390a9aa582a2b5e7981cd3277081385340b5873a3f0633c789811876eccb",
"kexec-tools-2.0.27.tar.xz": "38d78bcfa33a88928324b57dc81f50c1dfc279eede45e80957ca18f4e84b8187",
"live-image-kdump-howto.txt": "465a7ce28ecd9ff8f8c22ebfb17bbbafd01a52d81134be1203ee753856e4c37c",
"makedumpfile-1.6.8.tar.gz": "85d79b7090e9a8ce0d426795d3bc1de2858def7e12954d9bc6ae03de160b694c",
"mkdumprd": "ebe0cbd1152d9db3333357e898685854c7667d4c6d9df4c79196ab1e7294dad2",
"mkdumprd.8": "c2e85b4f28cfda870a8d7b4dec656a0bc88895e4b138e9bc4cf756ff7f839bcf"
}
}

Просмотреть файл

@ -6,7 +6,7 @@
Summary: The kexec/kdump userspace component
Name: kexec-tools
Version: 2.0.27
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
Vendor: Microsoft Corporation
Distribution: Mariner
@ -37,6 +37,7 @@ Source26: live-image-kdump-howto.txt
Source27: early-kdump-howto.txt
Source28: kdump-udev-throttler
Source29: kdump.sysconfig.aarch64
Source30: 51_kexec_tools.cfg
#######################################
# These are sources for mkdumpramfs
@ -62,6 +63,7 @@ Requires: ethtool
Requires: awk
Requires: dhcp-client
Requires: squashfs-tools
%{?grub2_configuration_requires}
BuildRequires: zlib-devel
BuildRequires: zlib
@ -76,6 +78,7 @@ BuildRequires: snappy-devel
BuildRequires: pkg-config
BuildRequires: intltool
BuildRequires: gettext
BuildRequires: grub2-rpm-macros
BuildRequires: systemd
BuildRequires: automake
BuildRequires: autoconf
@ -215,6 +218,10 @@ cp %{SOURCE109} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99earlyk
chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99earlykdump/%{remove_dracut_prefix %{SOURCE108}}
chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99earlykdump/%{remove_dracut_early_kdump_prefix %{SOURCE109}}
# Add kexec-tools-specific boot configurations to /etc/default/grub.d
# This configuration sets the crashkernel space allocated at boot
# to the AzureLinux default value
install -Dm 755 %{SOURCE30} %{buildroot}%{_sysconfdir}/default/grub.d/51_kexec_tools.cfg
%define dracutlibdir %{_prefix}/lib/dracut
#and move the custom dracut modules to the dracut directory
@ -224,6 +231,7 @@ mv $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/* $RPM_BUILD_ROOT/%{d
%post
# Initial installation
%systemd_post kdump.service
%grub2_post
touch /etc/kdump.conf
# This portion of the script is temporary. Its only here
@ -251,6 +259,7 @@ fi
%postun
%systemd_postun_with_restart kdump.service
%grub2_postun
%preun
# Package removal, not upgrade
@ -300,6 +309,7 @@ done
%{_sysconfdir}/makedumpfile.conf.sample
%config(noreplace,missingok) %{_sysconfdir}/sysconfig/kdump
%config(noreplace,missingok) %verify(not mtime) %{_sysconfdir}/kdump.conf
%config(noreplace) %{_sysconfdir}/default/grub.d/51_kexec_tools.cfg
%config %{_udevrulesdir}
%{_udevrulesdir}/../kdump-udev-throttler
%{dracutlibdir}/modules.d/*
@ -324,6 +334,12 @@ done
/usr/share/makedumpfile/
%changelog
* Tue Dec 05 2023 Cameron Baird <cameronbaird@microsoft.com> - 2.0.27-2
- Enable grub2-mkconfig-based boot path by installing
51_kexec_tools.cfg
- Call grub2-mkconfig to regenerate configs only if the user has
previously used grub2-mkconfig for boot configuration.
* Mon Nov 06 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 2.0.27-1
- Auto-upgrade to 2.0.27 - Azure Linux 3.0 - package upgrades