From c28271887bcb0def12c6d568a3b474a75c6e4e3c Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Wed, 4 Jun 2025 12:51:12 +0000 Subject: [PATCH] [build] Fix kdump build failure (Fixes 5097 17023) #### Why I did it The build fails if kdump is enabled on the build host, even though the relevant build step is performed in a dockerized chroot. ``` + sudo LANG=C chroot ./fsroot-cisco-8000 kdump-config symlinks 5.10.0-23-2-amd64 Cannot change symbolic links when kdump is loaded ... failed! ``` Fixes #5097, Fixes #17023 ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it kdump installation checks if kdump is already running and aborts if so. This is good in most cases, but it's not relevant when installing into a chroot inside a docker container. This adds a basic patch to disable this check during build. Note that the kdump status of the build host is imported into the docker build container via the sysfs file system: ``` $ ls -id /sys/kernel/kexec_crash_loaded && cat /sys/kernel/kexec_crash_loaded 7824 /sys/kernel/kexec_crash_loaded 0 $ docker run --rm debian bash -c "ls -id /sys/kernel/kexec_crash_loaded && cat /sys/kernel/kexec_crash_loaded" 7824 /sys/kernel/kexec_crash_loaded 0 ``` The inodes and file content are identical inside and outside of the container. #### How to verify it 1. Enable kdump on the build host 2. Confirm baseline build fails with the "Cannot change symbolic links when kdump is loaded" error 3. Apply this change and build succeeds #### Which release branch to backport (provide reason below if selected) - [x] 202405 - [x] 202411 - [x] 202505 #### Tested branch (Please provide the tested image version) master (29752056ef87ace404d073901cba6179ab074a12) #### Description for the changelog [build] fix build failure on kdump-enabled hosts #### Link to config_db schema for YANG module changes #### A picture of a cute animal (not mandatory but encouraged) --- src/kdump-tools/patch/series | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kdump-tools/patch/series b/src/kdump-tools/patch/series index 0af2c976020..369545368bc 100644 --- a/src/kdump-tools/patch/series +++ b/src/kdump-tools/patch/series @@ -1,2 +1,3 @@ 0002-core-file-prefixed-by-kdump.patch 0003-Revert-the-MODULES-dep-optimization.patch +0004-disable-kdump-load-check.patch