Comment 0 for bug 1346935

Revision history for this message
Björn Tillenius (bjornt) wrote : Failing to create simplestreams bucket on ceph-radosgw

If ceph-radosgw (which provides a Swift API for Ceph) is used instead of
Swift, simplestreams sync fail to create the simplestreams bucket.

I tried using the glance-simplestreams-sync charm, and got the following
error:

INFO * 07-22 14:05:30 [PID:3620] * swiftclient * REQ: curl -i http://10.96.
2.27:80/swift/simplestreams -X PUT -H "Content-Length: 0" -H "X-Auth-Token: a7f0
37d3245a4005834709b99e3e08f3" -H "X-Container-Read: .r:*,.rlistings"
INFO * 07-22 14:05:30 [PID:3620] * swiftclient * RESP STATUS: 405 Method No
t Allowed
INFO * 07-22 14:05:30 [PID:3620] * swiftclient * RESP HEADERS: [('date', 'T
ue, 22 Jul 2014 14:05:30 GMT'), ('accept-ranges', 'bytes'), ('content-type', 'ap
plication/json; charset=utf-8'), ('content-length', '27'), ('server', 'Apache/2.
4.7 (Ubuntu)')]
INFO * 07-22 14:05:30 [PID:3620] * swiftclient * RESP BODY: {"Code":"Method
NotAllowed"}
ERROR * 07-22 14:05:30 [PID:3620] * swiftclient * Container PUT failed: http
://10.96.2.27:80:80/swift/simplestreams 405 Method Not Allowed {"Code":"Method
NotAllowed"}
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1189, in _
retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 674, in pu
t_container
    http_response_content=body)
ClientException: Container PUT failed: http://10.96.2.27:80:80/swift/simplestrea
ms 405 Method Not Allowed {"Code":"MethodNotAllowed"}
ERROR * 07-22 14:05:30 [PID:3620] * root * Exception during do_sync
Traceback (most recent call last):
  File "/etc/cron.daily/glance-simplestreams-sync.py", line 286, in <module>
    do_sync(charm_conf)
  File "/etc/cron.daily/glance-simplestreams-sync.py", line 140, in do_sync
    store = SwiftObjectStore(SWIFT_DATA_DIR)
  File "/usr/lib/python2.7/dist-packages/simplestreams/objectstores/swift.py", l
ine 70, in __init__
    '.r:*,.rlistings'})
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1265, in p
ut_container
    response_dict=response_dict)
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 1189, in _
retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 674, in pu
t_container
    http_response_content=body)
ClientException: Container PUT failed: http://10.96.2.27:80:80/swift/simplestrea
ms 405 Method Not Allowed {"Code":"MethodNotAllowed"}

Note that it tries to PUT to http://10.96.2.27:80:80/swift/simplestreams, where
it should PUT to http://10.96.2.27:80:80/swift/v1/simplestreams. There seems
to be code in simplestreams that strip the version from the endpoint URL, but
even after I remove that I get a 409 error.