ci: resumable aria2 base-image pull + completeness check#14
Merged
Conversation
oras pull streams a multi-GB base blob over one HTTP/2 connection; ghcr drops it mid-stream with PROTOCOL_ERROR and oras leaves the partial file behind, which pull_image's existence-only check accepted as valid -> QEMU "Image is corrupt" on the next boot (tahoe setup rebuild died exactly this way after 3/3 failed pulls left a 19G truncated file). Resolve the qcow2 layer, follow ghcr's 307 to the presigned blob URL, and aria2 it with 8 connections + resume, re-resolving the (~10min-lived) presigned URL each round until the file reaches the manifest's declared size; then qemu-img check it. This is the resumable-pull approach already validated on the testbed. Adds aria2 to the workflow's apt install.
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.
Why
tahoe setup rebuild (run 28612246711) died with QEMU "Image is corrupt":
oras pullof the 35G:26-basehit ghcr's HTTP/2PROTOCOL_ERROR3/3 times (each ~8-10min), left a 19G truncated file, andpull_image's existence-only check accepted it. absorb/wait_cpu_idle never even ran.Fix
Replace the single-stream
oras pullwith the resumable approach already validated on the testbed: resolve the qcow2 layer from the manifest, follow ghcr's 307 to the presigned blob URL, andaria2c -c -x8it (8 connections + resume), re-resolving the ~10min-lived presigned URL each round until the file reaches the manifest's declared size — thenqemu-img checkbefore trusting it. Addsaria2to the workflow apt install.oras push(upload) is unchanged.Validation
bash -n + shellcheck clean. The aria2 resumable logic is the same one that pulled the full 35G blob on the testbed after single-stream curl/oras kept dropping.