Openstack cloud - boto get_all_buckets() returns no element found

I'm trying to make a Boto (version 2.38) S3 connection to my Openstack (Juno) cloud and list the containers (buckets).

This is with Python 2.7 and swift3 middleware (https://github.com/stackforge/swift3).

I'm using the admin account, which is also the account I made them with, so it shouldn't be a permissions issue.

I can make an ec2 connection and list all the images just fine.

I can't get an individual bucket either. The one attempted to be retrieved has 1 object in at that I can see in the Openstack dashboard and also list with the python-swiftclient.

Any suggestions would be greatly appreciated!

import boto
import boto.s3.connection
from boto.s3.connection import OrdinaryCallingFormat

import logging
logging.basicConfig(filename="boto.log", level=logging.DEBUG)

A_KEY = '<access_key>'
S_KEY = '<secret_key>'

s3_conn = boto.connect_s3(
    aws_access_key_id=A_KEY,
    aws_secret_access_key=S_KEY,
    port=8080,
    host='<host>',
    is_secure=False,
    path='/swift/v1',
    validate_certs=False,
    calling_format=boto.s3.connection.OrdinaryCallingFormat())

s3_conn.get_all_buckets()

###############################################

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/macleanal/Development/cl2/lib/python2.7/site-packages/boto/s3/connection.py", line 445, in get_all_buckets
    xml.sax.parseString(body, h)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/__init__.py", line 49, in parseString
    parser.parse(inpsrc)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 110, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 125, in parse
    self.close()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 225, in close
    self.feed("", isFinal = 1)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 217, in feed
    self._err_handler.fatalError(exc)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:1:0: no element found

#################################################

b = s3_conn.get_bucket('Test')

#################################################

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/macleanal/Development/cl2/lib/python2.7/site-packages/boto/s3/connection.py", line 502, in get_bucket
    return self.head_bucket(bucket_name, headers=headers)
  File "/Users/macleanal/Development/cl2/lib/python2.7/site-packages/boto/s3/connection.py", line 549, in head_bucket
    response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 204 No Content

And the log:

Thu, 01 Oct 2015 13:43:48 GMT

/swift/v1/
DEBUG:boto:Signature:
AWS <access_key>
DEBUG:boto:Final headers: {'Date': 'Wed, 30 Sep 2015 20:46:39 GMT', 'Content-Length': '0', 'Authorization': u'AWS <access_key>', 'User-Agent': 'Boto/2.38.0 Python/2.7.10 Darwin/14.5.0'}
DEBUG:boto:Response headers: [('date', 'Wed, 30 Sep 2015 20:45:32 GMT'), ('content-type', 'text/plain; charset=utf-8'), ('server', 'Apache/2.4.7 (Ubuntu)')]

/swift/v1/Test/
DEBUG:boto:Signature:
AWS <access_key>
DEBUG:boto:Final headers: {'Date': 'Thu, 01 Oct 2015 13:43:48 GMT', 'Content-Length': '0', 'Authorization': u'AWS <access_key>', 'User-Agent': 'Boto/2.38.0 Python/2.7.10 Darwin/14.5.0'}
DEBUG:boto:Response headers: [('x-container-object-count', '1'), ('server', 'Apache/2.4.7 (Ubuntu)'), ('x-container-bytes-used-actual', '4096'), ('x-container-bytes-used', '1652'), ('x-container-read', '.r:*'), ('date', 'Thu, 01 Oct 2015 13:42:39 GMT'), ('content-type', 'text/plain; charset=utf-8')]

Answers


By redeploying our dev cloud with Swift object storage this is no longer a problem. Ceph for object storage was not compatible enough with the Boto S3 API.


Need Your Help

How to find an actor in caf

c++ c++-actor-framework

I started to play around with caf and using it to represent a graph.

$.ajax working in browser but phonegap is returning the raw code from the file

php android jquery ajax cordova

The code/app/repository is on a Zend Server. I update it then use git to push it to github then use phonegap build to build the app. When I test the code in a browser pointed at the Zend Server it ...