← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1057322] Re: Image fails to upload to swift: TypeError: object of type 'CooperativeReader' has no len(

 

** Changed in: glance/grizzly
   Importance: Undecided => High

** Changed in: glance/grizzly
       Status: New => Fix Released

** Changed in: glance/grizzly
    Milestone: None => 2013.1

** Changed in: glance/grizzly
     Assignee: (unassigned) => Mark Washenberger (markwash)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1057322

Title:
  Image fails to upload to swift: TypeError: object of type
  'CooperativeReader' has no len(

Status in Ubuntu Cloud Archive:
  Confirmed
Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released
Status in Glance folsom series:
  Fix Released
Status in Glance grizzly series:
  Fix Released
Status in “glance” package in Ubuntu:
  Fix Released
Status in “glance” source package in Quantal:
  Fix Released

Bug description:
  Get the following error when trying to upload an image using the swift
  backend:

  2012-09-27 16:55:19 16190 DEBUG glance.store.swift [-] Adding image object '9af41b5a-f4a2-40bb-9344-10b75fb14459' to Swift add /usr/lib/python2.7/dist-packages/glance/store/swift.py:457
  2012-09-27 16:55:20 16190 ERROR glance.api.v1.images [-] Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 437, in _upload
      image_meta['size'])
    File "/usr/lib/python2.7/dist-packages/glance/store/swift.py", line 464, in add
      content_length=image_size)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1048, in put_object
      headers=headers)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 950, in _retry
      rv = func(self.url, self.token, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 803, in put_object
      conn.request('PUT', path, contents, headers)
    File "/usr/lib/python2.7/httplib.py", line 958, in request
      self._send_request(method, url, body, headers)
    File "/usr/lib/python2.7/httplib.py", line 992, in _send_request
      self.endheaders(body)
    File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
      self._send_output(message_body)
    File "/usr/lib/python2.7/httplib.py", line 818, in _send_output
      self.send(message_body)
    File "/usr/lib/python2.7/httplib.py", line 790, in send
      self.sock.sendall(data)
    File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 283, in sendall
      tail = self.send(data, flags)
    File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 265, in send
      len_data = len(data)
  TypeError: object of type 'CooperativeReader' has no len()

  Not sure if the bug is in swift/glance, looks like incompatibilities
  in supporting libraries.

  glance-api:
    Installed: 2012.2~rc1-0ubuntu1~cloud0
  python-swiftclient:
    Installed: 1:1.1.1-0ubuntu1~cloud0
  python-eventlet:
    Installed: 0.9.17-0ubuntu1~cloud0
  python2.7:
    Installed: 2.7.3-0ubuntu3.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1057322/+subscriptions