Skip to content

installer: resume interrupted release downloads - #55

Merged
chriskearney merged 7 commits into
integration/aurorafrom
candidate/installer-download-resume
Oct 11, 2026
Merged

chriskearney merged 7 commits into
integration/aurorafrom
candidate/installer-download-resume

Conversation

@chriskearney

@chriskearney chriskearney commented Oct 11, 2026 •

Copy link
Copy Markdown

Interrupted release downloads previously stopped with a misleading missing-asset error. Resume partial files across bounded retries; restart when a server ignores Range, limit stalled connections, and distinguish missing assets, denied requests and exhausted network/server failures. Every completed download—including HTTP 416—still passes its pinned SHA256 before package installation.

Retains Joshua Warren’s original commits and authorship from personal PR146. Fixes #18.

Validation: 10 focused controls cover real truncated HTTP transfers, Range restart, 416, 404, 401/403, 408/429/5xx, transport-reset/stall retries, corrupt data and production install admission. Independent adversarial review passes. The previous curl invocation fails the same truncated-transfer control with exit18; the resumed candidate completes byte-for-byte. The generated installer assembled with unchanged .13 packages passes its download/EFI/release controls (55 pass, 18 historical/optional skips). Desktop transaction controls pass after keeping the actual downloader in their fixture (21 tests). Shell syntax and diff checks pass.

No kernel/Mesa changes, hardware execution, or release asset changes. Shellcheck is unavailable because its installed binary has a missing shared library.

…ing it a packaging mistake

curl --retry repeats only timeouts and HTTP 408, 429 and 5xx, and it restarts at byte 0. An HTTP/2 stream reset (curl exit 92) was not retried, and any
failure printed 'the release is missing a file'. The release download loop now calls fetch_release_file: one curl -C - per try, five tries, so each try
continues from the bytes on disk. Only a 4xx answer keeps the missing-file message; a dropped connection says to run the same command again.

Signed-off-by: Chris Kearney <[email protected]>
…s, restart on exit 33

After five HTTP 503 answers fetch_release_file returned 22, so install_all
printed the packaging-mistake text for a server outage. It now returns 22
only for an immediate 4xx and 100 after five server errors. The failure text
covers both. Added --connect-timeout 30 --speed-limit 1024 --speed-time 60
so a stalled transfer ends. On curl exit 33 (server ignored the Range
request) the partial file is removed and the next try starts at byte 0.

Signed-off-by: Chris Kearney <[email protected]>
@joshuaswarren

Copy link
Copy Markdown

GREEN at head 9cd944d. No fixes needed.

I ran fetch_release_file from this head against a local range server (3 MB file, a known sha256) and also read the call site in install_all.

  • Connection cut twice, then resume: rc 0, 3000000 bytes, sha256 matches. The retries continue from the bytes on disk.
  • HTTP 404: returns 22 on the first try, no retries, file not created.
  • HTTP 503 on every try: five tries, returns 100, no file. install_all then prints the "network or a busy server" message.
  • Server ignores Range and the partial file exists: curl exits 33, the partial file is removed, the next try starts at byte 0 and the final sha256 matches.
  • File already complete, server answers 416: returns 0, file untouched.
  • Corrupt partial prefix and a server that resumes: returns 0 and the file is wrong, as the comment says. The sha256 check right after the call in install_all dies with "does not match its published checksum", so a bad prefix is caught and nothing installs.
  • Sourced from a script read on stdin (curl | bash style): the function does not read stdin, the next line of the script still runs, the final sha256 matches.
  • shellcheck -S warning: 3 findings on this head and the same 3 on the base. None are new.
  • Added lines have no lab names, paths or credentials.

The released installer (aurora-2026.10.11.13) still has plain curl --retry 3, which restarts at byte 0 on a retry. This change resumes from the bytes on disk. It is a draft, so I did not merge anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installer: resume interrupted downloads without weakening checksum admission

2 participants