Repository navigation
Fix/void interrupted uploads - #26
Merged
Merged
Conversation
added 2 commits
November 22, 2026 23:28
HyperCore lists an ISO from its creation on, so an interrupted upload left an ISO that never became ready. The backup service now tracks each running upload (backup.media_uploads, migration 060) and voids it when the stream breaks: the not-ready ISO, or the uploading-<name> disk, is deleted. The dashboard breaks the stream to the backup service as soon as the browser's body ends early, instead of passing it on as a normal end (which left the backup service waiting for its stall timeout). Uploads still running when the service stopped are swept at start. Start, end and failure are logged.
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.
Fix: a broken-off media upload is void and deleted (1.9.2)
Problem
HyperCore lists an ISO from the moment it is created (
POST /ISO), before any data has arrived. If an upload through HCM was interrupted (browser closed, connection dropped, backup service restarted), the half ISO stayed on the cluster withreadyForInsert: false. It never became usable and had to be deleted by hand. Nothing was logged, so it was hard to tell a slow upload from a broken one.Changes
backup.media_uploadstable (migration060_media_uploads.sql) until it finishes.Content-Length, the upload is void. A not-ready ISO is deleted. A disk image still converting (uploading-<name>) is deleted too. The request answers 502.Tested
test_an_iso_upload_that_breaks_off_is_void_and_deleted,test_uploads_left_by_an_earlier_run_are_voided_at_start,test_a_browser_that_breaks_off_breaks_the_stream_to_the_backup_service. The full suite passes locally and in a cleanpython:3.12-slimcontainer with onlytests/requirements.txt.docker restart sc_backupmid-upload: the half ISO was removed by the startup sweep within 45 s.backup.media_uploads.uploading-<name>) path. It has unit tests only.Upgrade notes
Migration 060 adds one table; no other changes to existing data.