More gracefully handle image/OVA file upload failures #121
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As it stands right now, if the image/OVA upload fails, specifically due to one of the conditional checks (e.g. at https://git.bonifacelabs.ca/parallelvirtualcluster/pvc/blob/master/api-daemon/pvcapid/helper.py#L1432), the response ends up triggering a 500/BrokenPipe exception on the client, since it is in the process of uploading the file when this error comes about, and HTTP/
requests
can't gracefully handle this.Investigate alternative fixes here, including:
(a) chunking the sending
(b) a multi-stage upload (prepare, upload, finish)
(c) other options as they come up
I feel like (b) might be the better option. It avoids having to refactor the already-fragile and hacky upload code, while still allowing us the ability to gracefully fail out of the initial steps.
So far I haven't seen any problems related to this reoccur, so specific examples would warrant their own bugfix issues.