Created
November 27, 2014 06:11
-
-
Save hkumarmk/efc0a660376af96457ac to your computer and use it in GitHub Desktop.
swift client errors on downloading
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
radosgw just works (tested for swift as of now), I am able to create containers and objects. But I see a weird issue on object download using swift client just fails complaining on content length vs readlength mismatch, but at the same time curl just works and I see right content in the downloaded file. | |
Here is the details | |
root@ocdb1-testjenkins-puppet-rjil-gate-265:/tmp# swift stat container openrc | |
Account: v1 | |
Container: container | |
Object: openrc | |
Content Length: 467 | |
Last Modified: Thu, 27 Nov 2014 05:30:59 GMT | |
ETag: 101f5a4e73ca2b4906a1b0e63ee0c907 | |
Meta Mtime: 1417055026.692599 | |
Accept-Ranges: bytes | |
Server: Apache/2.4.7 (Ubuntu) | |
Connection: close | |
>>> Swift client fail downloading the object complaining size mismatch (read length vs content length) | |
root@ocdb1-testjenkins-puppet-rjil-gate-265:/tmp# swift --debug download container openrcDEBUG:keystoneclient.auth.identity.v2:Making authentication request to http://lb.keystone.service.consul:5000/v2.0/tokens | |
INFO:urllib3.connectionpool:Starting new HTTP connection (1): lb.keystone.service.consul | |
DEBUG:urllib3.connectionpool:Setting read timeout to None | |
DEBUG:urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 3701 | |
DEBUG:iso8601.iso8601:Parsed 2014-11-27T06:31:54Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'06', 'daydash': u'27', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'54', 'tz_minute': None, 'year': u'2014', 'separator': u'T', 'monthdash': u'11', 'day': None, 'minute': u'31'} with default timezone <iso8601.iso8601.Utc object at 0x7fbcf9a69bd0> | |
DEBUG:iso8601.iso8601:Got u'2014' for 'year' with default None | |
DEBUG:iso8601.iso8601:Got u'11' for 'monthdash' with default 1 | |
DEBUG:iso8601.iso8601:Got 11 for 'month' with default 11 | |
DEBUG:iso8601.iso8601:Got u'27' for 'daydash' with default 1 | |
DEBUG:iso8601.iso8601:Got 27 for 'day' with default 27 | |
DEBUG:iso8601.iso8601:Got u'06' for 'hour' with default None | |
DEBUG:iso8601.iso8601:Got u'31' for 'minute' with default None | |
DEBUG:iso8601.iso8601:Got u'54' for 'second' with default None | |
INFO:urllib3.connectionpool:Starting new HTTP connection (1): lb.radosgw.service.consul | |
DEBUG:urllib3.connectionpool:Setting read timeout to <object object at 0x7fbcfc963090> | |
DEBUG:urllib3.connectionpool:"GET /swift/v1/container/openrc HTTP/1.1" 200 467 | |
DEBUG:swiftclient:REQ: curl -i http://lb.radosgw.service.consul:80/swift/v1/container/openrc -X GET -H "X-Auth-Token: 4490497e810343ec8d6a3fd9137d3891" | |
DEBUG:swiftclient:RESP STATUS: 200 OK | |
DEBUG:swiftclient:RESP HEADERS: [('content-length', '467'), ('accept-ranges', 'bytes'), ('server', 'Apache/2.4.7 (Ubuntu)'), ('last-modified', 'Thu, 27 Nov 2014 05:30:59 GMT'), ('connection', 'close'), ('etag', '101f5a4e73ca2b4906a1b0e63ee0c907'), ('date', 'Thu, 27 Nov 2014 05:31:54 GMT'), ('x-object-meta-mtime', '1417055026.692599')] | |
Error downloading object 'container/openrc': 'Error downloading openrc: read_length != content_length, 0 != 467' | |
>>>> using curl it just works | |
root@ocdb1-testjenkins-puppet-rjil-gate-265:/tmp# curl -i http://lb.radosgw.service.consul:80/swift/v1/container/openrc -X GET -H "X-Auth-Token: 32c79c5b60ef46968555e3f8957e02f2" | |
HTTP/1.1 200 OK | |
Date: Thu, 27 Nov 2014 05:31:48 GMT | |
Server: Apache/2.4.7 (Ubuntu) | |
Accept-Ranges: bytes | |
Last-Modified: Thu, 27 Nov 2014 05:30:59 GMT | |
etag: 101f5a4e73ca2b4906a1b0e63ee0c907 | |
X-Object-Meta-mtime: 1417055026.692599 | |
Content-Length: 467 | |
Connection: close | |
#!/bin/sh | |
export OS_NO_CACHE='true' | |
export OS_TENANT_NAME='testtenant' | |
export OS_USERNAME='testuser' | |
export OS_PASSWORD='testpass' | |
export OS_AUTH_URL='http://lb.keystone.service.consul:5000/v2.0/' | |
export OS_AUTH_STRATEGY='keystone' | |
export OS_REGION_NAME='RegionOne' | |
export CINDER_ENDPOINT_TYPE='publicURL' | |
export GLANCE_ENDPOINT_TYPE='publicURL' | |
export KEYSTONE_ENDPOINT_TYPE='publicURL' | |
export NOVA_ENDPOINT_TYPE='publicURL' | |
export NEUTRON_ENDPOINT_TYPE='publicURL' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment