This is the correct behaviour for python-glanceclient. The fact that we
close the connection before consuming the socket on the client side
indicates a problem with the way eventlet handles this. This shouldn't
result in an error in our logs and the entirety of that traceback comes
from eventlet.

** Changed in: glance
       Status: New => Invalid

You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.

  TRACEBACK if no output file specified while image download

Status in Glance:

Bug description:
  While downloading image data via 'glance client' we require to
  explicitly specify where the output should go. We need to specify
  output file either via '--file' command option or via stdout
  redirection. If we do not explicitly specify we get an error message
  which is fine but current implementation(on master) causes a TRACEBACK
  on the service side. Although the TRACEBACK is not fatal but it does
  look bad.

  Steps to reproduce:

  $ glance image-download <IMAGE ID>

  Sample command output:

  vagrant@ubuntu16:~$ glance image-download af9105b5-fc18-47b4-890d-c7f46e97b190
  No redirection or local file specified for downloaded image data. Please 
specify a local file with --file to save downloaded image or redirect output to 
another source.

  Sample glance api log output:

  2016-10-18 15:26:25.481 DEBUG glance.api.middleware.version_negotiation [-] 
Using url versioning from (pid=4737) process_request /o
  2016-10-18 15:26:25.482 DEBUG glance.api.middleware.version_negotiation [-] 
Matched version: v2 from (pid=4737) process_request /op
  2016-10-18 15:26:25.483 DEBUG glance.api.middleware.version_negotiation [-] 
new path /v2/images/af9105b5-fc18-47b4-890d-c7f46e97b190/file from (pid=4737) 
  2016-10-18 15:26:25.528 DEBUG glance.api.middleware.cache 
[req-42c4c736-baa2-41fe-b0ff-a9ba16dcbf0a 32b19608a63e45268f2afcac14f59539 
9cecc6ab160e405cb854d1671657a983] Cache hit for image 
'af9105b5-fc18-47b4-890d-c7f46e97b190' from (pid=4737) process_request 
  2016-10-18 15:26:25.532 INFO eventlet.wsgi.server 
[req-42c4c736-baa2-41fe-b0ff-a9ba16dcbf0a 32b19608a63e45268f2afcac14f59539 
9cecc6ab160e405cb854d1671657a983] Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/eventlet/", line 506, 
in handle_one_response
    File "/usr/local/lib/python2.7/dist-packages/eventlet/", line 452, 
in write
    File "/usr/lib/python2.7/", line 338, in writelines
    File "/usr/lib/python2.7/", line 307, in flush
    File "/usr/local/lib/python2.7/dist-packages/eventlet/greenio/", 
line 385, in sendall
      tail = self.send(data, flags)
    File "/usr/local/lib/python2.7/dist-packages/eventlet/greenio/", 
line 379, in send
      return self._send_loop(self.fd.send, data, flags)
    File "/usr/local/lib/python2.7/dist-packages/eventlet/greenio/", 
line 366, in _send_loop
      return send_method(data, *args)
  error: [Errno 104] Connection reset by peer

  We have same behavior for both v1 and v2 glance clients.

  Also 'openstack client' does not have this issue. There default
  behavior is to simply send data to stdout unless we explicitly provide
  '--file' option.

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to