Skip to content

Instantly share code, notes, and snippets.

@clayg
Created December 8, 2017 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/2a713f1b7a5b3cc44973411579db5b21 to your computer and use it in GitHub Desktop.
Save clayg/2a713f1b7a5b3cc44973411579db5b21 to your computer and use it in GitHub Desktop.
this is me trying to make a symlink with the cli
ubuntu@saio:~$ echo '' | swift upload test - --object-name test.builder -H 'x-symlink-target: /test-ec/test.builder' -H 'content-length: 0' --debug
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): saio
DEBUG:urllib3.connectionpool:http://saio:8080 "GET /auth/v1.0 HTTP/1.1" 200 0
DEBUG:swiftclient:REQ: curl -i http://saio:8080/auth/v1.0 -X GET
DEBUG:swiftclient:RESP STATUS: 200 OK
DEBUG:swiftclient:RESP HEADERS: {u'Content-Length': u'0', u'X-Trans-Id': u'txf2263f74f44a4b5595aea-005a2b1d2f', u'X-Auth-Token-Expires': u'8744', u'X-Auth-Token': u'AUTH_tk3e6082e2648f490987d8f2feb39f9b94', u'X-Storage-Token': u'AUTH_tk3e6082e2648f490987d8f2feb39f9b94', u'Date': u'Fri, 08 Dec 2017 23:15:59 GMT', u'X-Storage-Url': u'http://saio:8080/v1/AUTH_test', u'Content-Type': u'text/html; charset=UTF-8', u'X-Openstack-Request-Id': u'txf2263f74f44a4b5595aea-005a2b1d2f'}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): saio
DEBUG:urllib3.connectionpool:http://saio:8080 "PUT /v1/AUTH_test/test HTTP/1.1" 202 76
DEBUG:swiftclient:REQ: curl -i http://saio:8080/v1/AUTH_test/test -X PUT -H "Content-Length: 0" -H "X-Auth-Token: AUTH_tk3e6082e2648f490987d8f2feb39f9b94"
DEBUG:swiftclient:RESP STATUS: 202 Accepted
DEBUG:swiftclient:RESP HEADERS: {u'Date': u'Fri, 08 Dec 2017 23:15:59 GMT', u'Content-Length': u'76', u'Content-Type': u'text/html; charset=UTF-8', u'X-Openstack-Request-Id': u'txc1dc7b4322774c638f7c0-005a2b1d2f', u'X-Trans-Id': u'txc1dc7b4322774c638f7c0-005a2b1d2f'}
DEBUG:swiftclient:RESP BODY: <html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): saio
DEBUG:urllib3.connectionpool:http://saio:8080 "GET /auth/v1.0 HTTP/1.1" 200 0
DEBUG:swiftclient:REQ: curl -i http://saio:8080/auth/v1.0 -X GET
DEBUG:swiftclient:RESP STATUS: 200 OK
DEBUG:swiftclient:RESP HEADERS: {u'Content-Length': u'0', u'X-Trans-Id': u'tx05317e07b9184218be0fe-005a2b1d2f', u'X-Auth-Token-Expires': u'8744', u'X-Auth-Token': u'AUTH_tk3e6082e2648f490987d8f2feb39f9b94', u'X-Storage-Token': u'AUTH_tk3e6082e2648f490987d8f2feb39f9b94', u'Date': u'Fri, 08 Dec 2017 23:15:59 GMT', u'X-Storage-Url': u'http://saio:8080/v1/AUTH_test', u'Content-Type': u'text/html; charset=UTF-8', u'X-Openstack-Request-Id': u'tx05317e07b9184218be0fe-005a2b1d2f'}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): saio
DEBUG:urllib3.connectionpool:http://saio:8080 "HEAD /v1/AUTH_test/test/test.builder HTTP/1.1" 200 0
DEBUG:swiftclient:REQ: curl -i http://saio:8080/v1/AUTH_test/test/test.builder -I -H "X-Auth-Token: AUTH_tk3e6082e2648f490987d8f2feb39f9b94"
DEBUG:swiftclient:RESP STATUS: 200 OK
DEBUG:swiftclient:RESP HEADERS: {u'Content-Length': u'520', u'X-Object-Meta-Mtime': u'1512434070.749589', u'Accept-Ranges': u'bytes', u'Last-Modified': u'Fri, 08 Dec 2017 23:07:56 GMT', u'Etag': u'76a422fbb434bd8f40f6a6e62fabb263', u'X-Timestamp': u'1512774475.75719', u'X-Trans-Id': u'tx6eff1518c6aa411990a8f-005a2b1d2f', u'Date': u'Fri, 08 Dec 2017 23:15:59 GMT', u'Content-Type': u'application/octet-stream', u'X-Openstack-Request-Id': u'tx6eff1518c6aa411990a8f-005a2b1d2f'}
ERROR:swiftclient.service:sendall() argument 1 must be convertible to a buffer, not ReadableToIterable
Traceback (most recent call last):
File "/vagrant/python-swiftclient/swiftclient/service.py", line 2052, in _upload_object_job
response_dict=obr
File "/vagrant/python-swiftclient/swiftclient/client.py", line 1842, in put_object
response_dict=response_dict)
File "/vagrant/python-swiftclient/swiftclient/client.py", line 1691, in _retry
service_token=self.service_token, **kwargs)
File "/vagrant/python-swiftclient/swiftclient/client.py", line 1310, in put_object
conn.putrequest(path, headers=headers, data=contents)
File "/vagrant/python-swiftclient/swiftclient/client.py", line 449, in putrequest
return self.request('PUT', full_path, data, headers, files)
File "/vagrant/python-swiftclient/swiftclient/client.py", line 439, in request
files=files, **self.requests_args)
File "/vagrant/python-swiftclient/swiftclient/client.py", line 422, in _request
return self.request_session.request(*arg, **kwarg)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python2.7/httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 901, in _send_output
self.send(message_body)
File "/usr/lib/python2.7/httplib.py", line 873, in send
self.sock.sendall(data)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
TypeError: sendall() argument 1 must be convertible to a buffer, not ReadableToIterable
sendall() argument 1 must be convertible to a buffer, not ReadableToIterable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment