More gracefully handle image/OVA file upload failures #121

Closed
opened 2021-03-09 17:05:54 -05:00 by JoshuaBoniface · 2 comments
JoshuaBoniface commented 2021-03-09 17:05:54 -05:00 (Migrated from git.bonifacelabs.ca)

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

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
JoshuaBoniface commented 2021-05-19 16:56:54 -04:00 (Migrated from git.bonifacelabs.ca)

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.

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.

So far I haven't seen any problems related to this reoccur, so specific examples would warrant their own bugfix issues.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: parallelvirtualcluster/pvc#121
No description provided.