Repository navigation
fix(init-bedrock): overwrite a leftover snapshot archive on retry - #99
Open
furkan3152 wants to merge 2 commits into
Open
furkan3152 wants to merge 2 commits into
furkan3152 wants to merge 2 commits into
Conversation
When bedrock-init fails after the archive is on disk (checksum mismatch, interrupted extraction), the snapshot_downloads volume keeps /downloads/snapshot.tar.zst. On the next run aria2c's default auto-file-renaming saves the new download as snapshot.tar.1.zst, and the script then verifies and extracts the stale snapshot.tar.zst instead. Once a newer daily snapshot is published the retry can never pass the checksum, and each attempt leaves another full-size archive behind. Let aria2c overwrite the target file. Downloads that still have their .aria2 control file are resumed as before.
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.
If
bedrock-initfails after the snapshot is fully downloaded (a checksum mismatch, or extraction interrupted bydocker compose down),/downloads/snapshot.tar.zststays in thesnapshot_downloadsvolume. On the next run, aria2c's defaultauto-file-renamingsaves the new download assnapshot.tar.1.zst, and the script goes on to verify and extract the stalesnapshot.tar.zst. Once a newer daily snapshot is out, the retry can never pass the checksum (so the README's "retry later" doesn't work withoutdown -v), and each attempt leaves another 250–400 GB archive behind.This passes
--allow-overwrite=true --auto-file-renaming=falseto aria2c so the retry replaces the stale file. Downloads that still have a.aria2control file resume as before.Reproduced locally with aria2c against the repo's
downloadandverify_sha256_checksum: before, the second run logsFile already exists. Renamed to snapshot.tar.1.zstand thenSHA256 verification failed; after, the retry downloads in place and the checksum passes.bash -nandshellcheckare clean.