[openstack-dev] [nova] [glance] How to deal with aborted image read?

Chris Friesen chris.friesen at windriver.com
Fri Jun 5 04:51:59 UTC 2015


On 06/04/2015 07:16 PM, Joshua Harlow wrote:
> Perhaps someone needs to use (or forgot to use) contextlib.closing?
>
> https://docs.python.org/2/library/contextlib.html#contextlib.closing
>
> Or contextlib2 also may be useful:
>
> http://contextlib2.readthedocs.org/en/latest/#contextlib2.ExitStack

The complication is that the error happens in nova, but it's glance-api that 
holds the file descriptor open.

So somehow the error has to be detected in nova, then the fact that nova is no 
longer interested in the file needs to be propagated through glanceclient via an 
HTTP call into glance-api so that it knows it can close the file descriptor. 
And I don't think that an API to do this exists currently.

Chris



More information about the OpenStack-dev mailing list