Is OpenStack swift compatible with the Rackspace Cloud Files API?
From the documentation, it looks like OpenStack swift == Rackspace Cloud Files, so can we assume that we can use the existing Cloud Files API bindings for java and .net to access swift? Thanks...
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- GalacticJello
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Yes, they should work fine. I'm not specifically certain with java and .net, but here's a quick session I used on my development box with python-cloudfiles (Note: I'm already running OpenStack Swift on the box)
$ git clone http://
$ cd python-cloudfiles
$ python -c "import cloudfiles; print cloudfiles.
(4, 13641451)
Revision history for this message
|
#2 |
Hi, gholt,
I have tried Python bindings as your suggestion. After setting up virtual machine, I installed Python-cloudfiles.
Following steps are ok:
>>> conn = cloudfiles.
>>> containers = conn.get_
>>> type(containers)
<class 'cloudfiles.
>>> len(containers)
2
>>> for container in containers: print container.name
...
ttt
ttt2
>>> fruit_container = containers[0]
>>> myfile = fruit_container
However, when uploading files, I got error messages.
>>> myfile.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cloudfiles/
return f(*args, **kwargs)
File "cloudfiles/
raise ResponseError(
cloudfiles.
>>> myfile.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cloudfiles/
self.
File "cloudfiles/
return f(*args, **kwargs)
File "cloudfiles/
raise ResponseError(
cloudfiles.
The syslog information (for >>>myfile.
Aug 21 15:19:07 csxbwang-ubuntu account 127.0.0.1 - - [21/Aug/
Aug 21 15:19:07 csxbwang-ubuntu container 127.0.0.1 - - [21/Aug/
Aug 21 15:19:07 csxbwang-ubuntu object ERROR __call__ error with PUT /sdb3/217384/
Aug 21 15:19:07 csxbwang-ubuntu object 127.0.0.1 - - [21/Aug/
Aug 21 15:19:07 csxbwang-ubuntu proxy ERROR 500 Traceback (most recent call last):#012 File "/home/
Aug 21 15:19:07 csxbwang-ubuntu proxy ERROR 500 Traceback (most recent call last):#012 File "/home/
Aug 21 15:19:07 csxbwang-ubuntu proxy ERROR 500 Traceback (most recent call last):#012 File "/home/
Aug 21 15:19:07 csxbwang-ubuntu proxy Object PUT returning 503 for [500, 500, 500], transaction tx37d8b49d-
Aug 21 15:19:07 csxbwang-ubuntu proxy - 127.0.0.1 21/Aug/
What is the problem?
Revision history for this message
|
#3 |
This error:
...xattr/
This is the code trying to write xattrs to a file system that does not support xattrs. Swift data drives, the ones pointed to by the 'devices' configuration variable, require xattr support. It has been tested with xfs, but other file systems also support xattrs (see http://
Also, see http://
Revision history for this message
|
#4 |
After testing out the .NET bindings a bit, the answer is "not without a lot of refactoring". As mentioned in another question, the encoding of the username (like test:tester) causes problems, and most of the container access parts of the API is assuming the existence of the CloudFiles' "X-CDN-