Glance create API times out with copy_from header
Bug #1008874 reported by
Gabriel Hurley
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Eoghan Glynn |
Bug Description
The code in the create method goes through two discrete stages, the _reserve stage that creates the record, and the _handle_source stage that adds the image data to the store. When doing a copy-from operation, this can involve a very lengthy download which ties up the response causing socket timeouts, etc. for the API, especially when used from Horizon.
There's no reason that download can't happen asynchronously. Simply let the _handle_source method happen in its own thread and return a 202 Accepted from the API there.
The relevant bit to be spun off are the lines here: https:/
Changed in glance: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → folsom-3 |
Changed in glance: | |
assignee: | nobody → Eoghan Glynn (eglynn) |
Changed in glance: | |
milestone: | folsom-3 → none |
Changed in glance: | |
milestone: | none → folsom-rc1 |
Changed in glance: | |
status: | Triaged → In Progress |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | folsom-rc1 → 2012.2 |
To post a comment you must log in.
The fix will involve an asynchronous copy-from, but not a 202 Accepted status code as suggested, since such a change to a non-error response would require a API version bump, see:
http:// wiki.openstack. org/APIChangeGu idelines
The status code from the image creation will continue to be 201 Created in all cases, with the initial image status reported as queued while the asynchronous copy-from is in progress.