Implement kexec reboot support for SSH mode#20
Open
aleksandrov-denis wants to merge 3 commits intorhkdump:mainfrom
Open
Implement kexec reboot support for SSH mode#20aleksandrov-denis wants to merge 3 commits intorhkdump:mainfrom
aleksandrov-denis wants to merge 3 commits intorhkdump:mainfrom
Conversation
Github Action will run basic tests including format-check, static-analysis and unit-tests. And testing farm will run integration tests. Pull request workflows from forked repositories don't have access to repository secrets by default. To address this issue, 1) create a dedicated environment and 2) use pull_request_target so only approved PR can run the workflow.
do_kexec_reboot() was a stub that always fell back to a full reboot. Implement it properly for SSH mode, where CRIU is not involved and kexec is safe to use. Add kexec_load_kernel() to lib.sh which validates that the kernel and initramfs files exist, reads the current command line from /proc/cmdline, and loads the new kernel into memory with kexec -l. Add kab_kexec() which executes the loaded kernel via reboot_and_wait. In local/CRIU mode, kexec bypasses the normal boot sequence that CRIU relies on to restart the daemon, so the existing fallback to full reboot is preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The dnf install output was being redirected to /var/log/install.log on the controller machine (local shell redirect), which fails when the controller runs as a non-root user. Pass the redirect as an argument to run_cmd so it is evaluated on the test host, consistent with how install_from_git handles its build log. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d36b580 to
4ed3d67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
REBOOT_STRATEGY=kexec was documented and configurable but not implemented — do_kexec_reboot() was a
stub that always fell back to a full system reboot. This PR implements it for SSH mode, reducing
per-iteration reboot time from ~60s to ~18s.
Changes
Implement kexec support for SSH mode
Adds two helpers to lib.sh:
host, reads the current kernel command line from /proc/cmdline, and loads the new kernel into memory
with kexec -l
Updates do_kexec_reboot() in reboot_handler.sh:
otherwise executes with kab_kexec
boot sequence that the CRIU daemon relies on to restore the bisect process
install_from_rpm: redirect dnf output on the test host
Fixes a bug where dnf install output in install_from_rpm was redirected to /var/log/install.log via a
local shell redirect, which fails when the controller runs as a non-root user. The redirect is now
passed as an argument to run_cmd so it executes on the test host — consistent with how install_from_git
handles its build log.
Testing
Tested end-to-end on RHEL 9.8 in SSH mode (INSTALL_STRATEGY=rpm, TEST_STRATEGY=simple,
REBOOT_STRATEGY=kexec) bisecting across three CentOS Stream 9 kernel versions (5.14.0-687/688/689):