Re: [Openstack] [folsom] Swift-backed glance fails x-glance-api-copy-from

2012-10-07 Thread Sam Morrison
I have a bug for this at 
https://bugs.launchpad.net/ubuntu/+source/glance/+bug/1057322

Are you using the cloud archive packages? I'm assuming this is a version 
compatibility for glance/eventlet etc.

Haven't had a chance to test this on quantal. 

Cheers,
Sam



On 08/10/2012, at 12:24 PM, Pete Zaitcev  wrote:

> On Fri, 05 Oct 2012 13:27:17 +0200
> Koert van der Veer  wrote:
> 
>> ERROR glance.api.v1.images [-] Traceback (most recent call last):
>>  File "/usr/lib/python2.7/dist-ackages/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 1079, 
>> in put_object
>>headers=headers)
>>  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 981, in 
>> _retry
>>rv = func(self.url, self.token, *args, **kwargs)
>>  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 828, 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()
> 
> Log that traceback using Launchpad bug tracking. Even if Swift
> provoked it, Glance should not be tracebacking.
> 
> -- Pete
> 
> ___
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] [folsom] Swift-backed glance fails x-glance-api-copy-from

2012-10-07 Thread Pete Zaitcev
On Fri, 05 Oct 2012 13:27:17 +0200
Koert van der Veer  wrote:

> ERROR glance.api.v1.images [-] Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-ackages/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 1079, 
> in put_object
> headers=headers)
>   File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 981, in 
> _retry
> rv = func(self.url, self.token, *args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 828, 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()

Log that traceback using Launchpad bug tracking. Even if Swift
provoked it, Glance should not be tracebacking.

-- Pete

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] [folsom] Swift-backed glance fails x-glance-api-copy-from

2012-10-05 Thread Koert van der Veer
We've set up a glance server, backed by a swift cluster. Regular uploads
with the cli work fine. However, when I try to upload an image via
Horizon, the upload fails. The log states: TypeError: object of type
'CooperativeReader' has no len(). Is this a bug, or is it a
configuration error on our side?

Regards,
Koert van der Veer, CloudVPS

The actual upload request is:


The full packet capture can be found here:
http://www.cloudshark.org/captures/f23d29d12471

PUT /v1/images/d003b1e8-be68-4de2-a969-eeccfda0bc27 HTTP/1.1
Host: glance.tst.xl-is.net:9292
Accept-Encoding: identity
x-glance-api-copy-from:
http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
Content-Type: application/octet-stream
X-Auth-Token: 298a35765cf74474b6a0bd9601b6c565
User-Agent: python-glanceclient

The logged exception is:

ERROR glance.api.v1.images [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-ackages/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
1079, in put_object
headers=headers)
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line
981, in _retry
rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line
828, 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()



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp