Comment 7 for bug 862664

Revision history for this message
Jay Pipes (jaypipes) wrote : Re: Repeated connection reset errors when calling from Horizon

I think I have figured out what's going on... still investigating but I can reproduce this easily in Horizon. It seems that the Horizon code is calling the wrong method of the glance client -- calling glance.client.Client.get_image() instead of get_image_meta(). get_image() returns the metadata and a file iterator object, and the Horizon code is simply ignoring the file iterator object which, upon garbage collection, tries to reset the socket connection in eventlet...

I think the solution is to patch horizon/horizon/api/glance.py:70-71 from this:

def image_get(request, image_id):
    return Image(glance_api(request).get_image(image_id)[0])

to this:

def image_get(request, image_id):
    return Image(glance_api(request).get_image_meta(image_id))

I will propose a patch to Horizon that fixes the issue.

Cheers,
-jay