Bug 1150066
| Summary: | RFE: expose an API to get the image upload state | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Matthias Runge <mrunge> |
| Component: | openstack-glance | Assignee: | Flavio Percoco <fpercoco> |
| Status: | CLOSED UPSTREAM | QA Contact: | nlevinki <nlevinki> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.0 (RHEL 7) | CC: | eglynn, fpercoco, mrunge, scohen, yeylon |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-06-12 15:17:03 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1036505 | ||
|
Description
Matthias Runge
2014-10-07 11:38:13 UTC
Currently, Glance supports 3 types of image upload. One is direct upload, another one is using a copy mechanism and the third one is to simply point to a remote location. For all of the above, Glance will show the image in `queue` state if no image data has been uploaded, `saving` is the image data is being gathered and `active` once that process ends. For which of the 3 types of uploads do you need this and why isn't the current mechanism enough? It'll be really hard - close to impossible - to provide a reliable mechanism to show a progress status for these operations due to the fact that we almost never know what the actual size of the image is until we've uploaded/downloaded it completely. Flavio, we want to upload to glance most probably by proxying through horizon. The current mechanism in glanceclient is not enough, because it's console hack and we can't know, what was already transferred to glance, i.e. what portion of data already reached the storage. We have a feature request to display a progress bar for uploads. The current progress bar is a console hack because that's the only way we can make it work. As I mentioned in the previous comment, we don't know the actual size of the image until it's been fully downloaded/uploaded, therefore we can't implement a progress status reliably. The status thing, however, is part of the image and it'd be the only thing that can express, reliably, the status of the image. Just for the sake of clarity, my point is that the receiver of the data can't know how much data has yet to be sent unless it's told in advance how much data will be sent. Since this is not the case and there's no way - and probably won't be - to do this, I think this can't be implemented. Hopefully, I understood correctly what you need, otherwise, lets talk about this a bit more. Flavio, when saying, it's not possible to know the size of a file to be uploaded, then I'd assume, it's not possible to implement this feature at all, right? Would it be possible to return the amount of data already transferred? That way, we'd had something to show to the user. Matthias, that's correct. Can we move this upstream? TBH, this could also be implemented in horizon directly with a cooperative reader (or similar implementations). If we implement it in Glance, it'll be part of the client's CLI, which will be of no use to Horizon. :/ Sure, let's discuss this upstream. The issue with implementing this in horizon is: while proxying, you still have no clue, how much has been transferred. I agree, it'd be silly to make an api call to query glance, how much data for an image was received :/ |