Repository navigation
test(convert): verify delta data survival and interrupted init recovery - #150
Merged
Merged
Conversation
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
The persist scenarios only asserted that the same overlay boots twice, not that the delta's content survives a reboot. Inject a oneshot unit into the pre-converted image that writes a random sentinel to /var/lib (living on the dm-snapshot COW) and reports to the serial console; the second boot now must see the identical sentinel UUID after a forced VM kill, which is the power-loss case issue #141 asked to cover. The third boot covers the interrupted-initialization case: the COW header chunk is blanked through the opened LUKS mapping (read-write, so the dm-integrity journal replays), simulating a crash between marking the delta volume initialized and committing the snapshot header; the boot must recover by reinitializing the snapshot. The sentinel injection uses qemu-nbd and a plain mount instead of libguestfs: Alinux 3 ships virt-customize, Alinux 4's merged libguestfs package does not, and the pre-converted rootfs partition is unencrypted ext4 anyway. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
lsblk's FSTYPE column comes from the udev database, and the CI test container runs no udev, so the sentinel injection found no ext4 root partition and failed within seconds on every persist job. blkid probes the device directly and needs no udev; partition nodes exist either way because devtmpfs creates them. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
…manager The alinux4 repos started shipping guestfs-tools (pulled in by libguestfs), so virt-customize suddenly appears in the alinux4 CI test containers. There it is unusable: supermin 5.3.5 has no driver for alinux4's os-release (ID_LIKE=anolis only, while alinux3 also lists rhel/fedora/centos), so every virt-customize invocation fails instantly with "could not detect package manager" and takes every convert test job down with it. This also turned master's CI red. Extend the existing "virt-customize unavailable, skip hardening" guard to cover the unusable case, with a loud warning that stays in the logs. The proper fix is on the packaging side (an anolis driver in supermin, or ID_LIKE coverage in alinux4's os-release). Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
imlk0
force-pushed
the
ci/persist-sentinel-recovery
branch
from
October 13, 2026 09:27
c239c43 to
765751e
Compare
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
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.
Extends the disk-persist regression scenarios (issues #140 / #141) from "boots twice" to what issue #141 actually asked for: delta content survival across a forced power loss, and recovery from an interrupted delta initialization. No new CI jobs: the existing 4
test-convert-persistjobs each gain a third boot.What each persist job now runs
/var/liband syncs./var/liblives on the dm-snapshot COW, i.e. the persistent delta.Implementation notes
/dev/console(serial), so the harness only greps the boot log it already collects: no SSH, console input, or cloud-init (the guest FDE service reads cloud-init user data for its config, so a NoCloud seed would interfere).test_qemu_boot_directgained an optional required-marker argument (success = login AND marker), used for the sentinel checks.Verification
Local end-to-end (disk-persist + integrity=true + stable key, UKI, TCG):
CRYPTPILOT_SENTINEL_WRITTEN aaffcc3e-…CRYPTPILOT_SENTINEL_OK aaffcc3e-…(identical UUID)COW header chunk blanked (interrupted initialization simulated)bash -n+ shellcheck clean, YAML valid. CI will run both scenarios on both distros.Refs: #140, #141.