Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes LP Bug#862664 - Improper calls to get_image
The glance.client.Client.get_image() call returns a tuple of (metadata, image_iterator). Unfortunately, Horizon's glance API calls get_image() when it means to call get_image_meta(). Because the call to get_image() simply ignores the image iterator returned from get_image(), when the image iterator is garbage-collected, this causes the connection to Glance to be closed, however by that time the socket bound to the iterator has been switched out by eventlet. The result is lots of these in the Glance API log: 2011-09-28 17:46:12 DEBUG [glance.store.filesystem] Found image at /opt/stack/glance/images/3. Returning in ChunkedFile. 2011-09-28 17:46:12 DEBUG [eventlet.wsgi.server] Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/eventlet/wsgi.py", line 351, in handle_one_response write(''.join(towrite)) File "/usr/lib/pymodules/python2.7/eventlet/wsgi.py", line 301, in write _writelines(towrite) File "/usr/lib/python2.7/socket.py", line 334, in writelines self.flush() File "/usr/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) File "/usr/lib/pymodules/python2.7/eventlet/greenio.py", line 283, in sendall tail = self.send(data, flags) File "/usr/lib/pymodules/python2.7/eventlet/greenio.py", line 269, in send total_sent += fd.send(data[total_sent:], flags) error: [Errno 104] Connection reset by peer This patch fixes the improper calls to get_image() by replacing them with appropriate calls to get_image_meta(). Change-Id: I741a207ba0e222820492aeb48bab9464d17539ab
- Loading branch information
Showing
8 changed files
with
38 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters