ddd428a1d0
osbuild is a tool to build OS images. It uses bwrap to install packages inside a sandbox/container. Since the kernel package recommends kexec-tools which in turn recommends grubby, the installation order would be grubby -> kexec-tools -> kernel. So we can use the kernel hook 92-crashkernel.install provided by kexec-tools to set up kernel crashkernel for the target OS image. But in osbuild's case, there is no current running kernel and running `uname -r` in the container/sandbox actually returns the host kernel release. To set up kernel crashkernel for the OS image built by osbuild, a different logic is needed. We will check if kernel hook is running inside the osbuild container then set up kernel crashkernel only if osbuild hasn't specified a custome value. osbuild exposes [1] the container=bwrap-osbuild environment variable. According to [2], the environment variable is not inherited down the process tree, so we need to check /proc/1/environ to detect this environment variable to tell if the kernel hook is running inside a bwrap-osbuild container. After that we need to know if osbuild wants to use custom crashkernel value. This is done by checking if /etc/kernel/cmdline has crashkernel set [3]. /etc/kernel/cmdline is written before packages are installed. [1] https://github.com/osbuild/osbuild/pull/926 [2] https://systemd.io/CONTAINER_INTERFACE/ [3] https://bugzilla.redhat.com/show_bug.cgi?id=2024976#c5 Reviewed-by: Pingfan Liu <piliu@redhat.com> Reviewed-by: Philipp Rudo <prudo@redhat.com> Signed-off-by: Coiby Xu <coxu@redhat.com> |
||
---|---|---|
tests | ||
.editorconfig | ||
.gitignore | ||
60-kdump.install | ||
92-crashkernel.install | ||
98-kexec.rules | ||
98-kexec.rules.ppc64 | ||
crashkernel-howto.txt | ||
dracut-early-kdump-module-setup.sh | ||
dracut-early-kdump.sh | ||
dracut-fadump-init-fadump.sh | ||
dracut-fadump-module-setup.sh | ||
dracut-kdump-capture.service | ||
dracut-kdump-emergency.service | ||
dracut-kdump-emergency.target | ||
dracut-kdump.sh | ||
dracut-module-setup.sh | ||
dracut-monitor_dd_progress | ||
early-kdump-howto.txt | ||
fadump-howto.txt | ||
kdump-dep-generator.sh | ||
kdump-in-cluster-environment.txt | ||
kdump-lib-initramfs.sh | ||
kdump-lib.sh | ||
kdump-logger.sh | ||
kdump-migrate-action.sh | ||
kdump-restart.sh | ||
kdump-udev-throttler | ||
kdump.conf | ||
kdump.conf.5 | ||
kdump.service | ||
kdump.sysconfig | ||
kdump.sysconfig.aarch64 | ||
kdump.sysconfig.i386 | ||
kdump.sysconfig.ppc64 | ||
kdump.sysconfig.ppc64le | ||
kdump.sysconfig.s390x | ||
kdump.sysconfig.x86_64 | ||
kdumpctl | ||
kdumpctl.8 | ||
kexec-kdump-howto.txt | ||
kexec-tools.spec | ||
live-image-kdump-howto.txt | ||
mkdumprd | ||
mkdumprd.8 | ||
mkfadumprd | ||
README | ||
sources | ||
zanata-notes.txt |
Adding a patch to kexec-tools ============================= There is a mailing list kexec@lists.fedoraproject.org where all the dicussion related to fedora kexec-tools happen. All the patches are posted there for inclusion and committed to kexec-tools after review. So if you want your patches to be included in fedora kexec-tools package, post these to kexec@lists.fedoraproject.org. One can subscribe to list and browse through archives here. https://admin.fedoraproject.org/mailman/listinfo/kexec