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.
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. swift/simplestr eams -X PUT -H "Content-Length: 0" -H "X-Auth-Token: a7f0 709b99e3e08f3" -H "X-Container-Read: .r:*,.rlistings" 2.27:80: 80/swift/ simplestreams 405 Method Not Allowed {"Code":"Method python2. 7/dist- packages/ swiftclient/ client. py", line 1189, in _ python2. 7/dist- packages/ swiftclient/ client. py", line 674, in pu response_ content= body) 10.96.2. 27:80:80/swift/ simplestrea :"MethodNotAllo wed"} daily/glance- simplestreams- sync.py" , line 286, in <module> sync(charm_ conf) daily/glance- simplestreams- sync.py" , line 140, in do_sync e(SWIFT_ DATA_DIR) python2. 7/dist- packages/ simplestreams/ objectstores/ swift.py" , l *,.rlistings' }) python2. 7/dist- packages/ swiftclient/ client. py", line 1265, in p dict=response_ dict) python2. 7/dist- packages/ swiftclient/ client. py", line 1189, in _ python2. 7/dist- packages/ swiftclient/ client. py", line 674, in pu response_ content= body) 10.96.2. 27:80:80/swift/ simplestrea :"MethodNotAllo wed"}
2.27:80/
37d3245a4005834
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.
NotAllowed"}
Traceback (most recent call last):
File "/usr/lib/
retry
rv = func(self.url, self.token, *args, **kwargs)
File "/usr/lib/
t_container
http_
ClientException: Container PUT failed: http://
ms 405 Method Not Allowed {"Code"
ERROR * 07-22 14:05:30 [PID:3620] * root * Exception during do_sync
Traceback (most recent call last):
File "/etc/cron.
do_
File "/etc/cron.
store = SwiftObjectStor
File "/usr/lib/
ine 70, in __init__
'.r:
File "/usr/lib/
ut_container
response_
File "/usr/lib/
retry
rv = func(self.url, self.token, *args, **kwargs)
File "/usr/lib/
t_container
http_
ClientException: Container PUT failed: http://
ms 405 Method Not Allowed {"Code"
Note that it tries to PUT to http:// 10.96.2. 27:80:80/swift/ simplestreams, where 10.96.2. 27:80:80/swift/ v1/simplestream s. There seems
it should PUT to http://
to be code in simplestreams that strip the version from the endpoint URL, but
even after I remove that I get a 409 error.