Ask Your Question
0

Can't access to a container

asked 2013-02-26 15:09:02 -0500

ac-3 gravatar image

Hi,

I have installed the devstack version with swift on ubuntu. The installation is up an running. I have create a container. Until no problem. Now I want to get access to the container but it proves not so easy. I have tried a lot of curl commands and it seems like I will never get a x-auth-token.

Can someone help me?

root@ubuntu:~# swift -A http://10.1.1.37:8080/v1 -U admin -K password list Auth GET failed: http://10.1.1.37:8080/v1 412 Precondition Failed

root@ubuntu:~# swift -A http://localhost:5000/v2.0 -U admin -K password list Auth GET failed: http://localhost:5000/v2.0 200 OK

Regards, Andreas

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2013-02-27 15:13:12 -0500

ac-3 gravatar image

OK I have just success upload a file into a container through cli:

root@ubuntu:/etc/swift# swift -A http://127.0.0.1:8080/auth/v1.0 -U admin:admin -K admin list testcontainer

root@ubuntu:/etc/swift# swift -A http://127.0.0.1:8080/auth/v1.0 -U admin:admin -K admin upload testcontainer swift.conf swift.conf

Know someone the correct options for the cyberduck program? I have already import the "swift unsecure" profile to get access through http instead https. Perhaps there are other good swift clients for testing?

edit flag offensive delete link more
0

answered 2013-02-27 11:03:19 -0500

ac-3 gravatar image

Hi Fabien,

I only need to know how do access to a container after setup a fresh devstack installation with swift.

root@ubuntu:~# swift list --os-auth-url http://10.1.1.37:5000/v2.0 --os-username admin --os-password password --os-tenant-name admin TestContainer

It can't be so difficult.

edit flag offensive delete link more
0

answered 2013-02-27 08:52:27 -0500

fabien-boucher gravatar image

Hi Andreas,

You need to use the API of swift to access store/access backup on your swift account, you should have a look at: http://docs.openstack.org/api/opensta... If your backup software is not able to use directly the swift API it can be difficult to so, maybe you need to develop a kind of middleware. I've found this on github maybe it could help https://github.com/redbo/cloudfuse . I cannot help you anymore ...

Regards, Fabien

edit flag offensive delete link more
0

answered 2013-02-27 07:51:36 -0500

ac-3 gravatar image

Hi Fabien,

thanks you for your help.

The command works: root@ubuntu:~# swift list --os-auth-url http://10.1.1.37:5000/v2.0 --os-username admin --os-password password --os-tenant-name admin -V 2 TestContainer

An now, how can I get access to the container from externel programms? I want to store backups into a container. I must specify an storage path url like this: example: <host>[:<port>]/<container&lt;[ <prefix="">]

Here my one: IP:5000/v2.0/TestContainer

First, if I tried to acces through webbrowser I get the following: <error message="The resource could not be found." code="404" title="Not Found"/>

Precaution, if I tried the following, I get: http://ip:8080/v1/TestContainer Unauthorized

I have to mount the container through the backup software. I will still get a failure.

Can someone tell me how to access to an container from external?

edit flag offensive delete link more
0

answered 2013-02-26 22:48:44 -0500

fabien-boucher gravatar image

Hi Andreas,

In devstack you must use the v2.0 API of keystone, so your second command must be as follow :

fabien@ubuntu:~/devstack$ OS_TENANT_NAME=demo swift -A http://192.168.1.47:5000/v2.0 -V 2 -U demo -K wxcvbn list mycontainer

If I not provide the API version, the command fails : fabien@ubuntu:~/devstack$ OS_TENANT_NAME=demo swift -A http://192.168.1.47:5000/v2.0 -U demo -K wxcvbn list Auth GET failed: http://192.168.1.47:5000/v2.0 200 OK

In devstack you can source the openrc file that contains default informations for tenant, username, and password. Environnements variables will be set correctly. fabien@ubuntu:~/devstack$ . openrc fabien@ubuntu:~/devstack$ swift -A http://192.168.1.47:5000/v2.0 list mycontainer

This is the same as the above command except that we use admin account and set environnement variables for this swift command: fabien@ubuntu:~/devstack$ OS_USERNAME=admin OS_TENANT_NAME=admin USER_PASSWORD=wxcvbn swift -A http://192.168.1.47:5000/v2.0 post admincontainer fabien@ubuntu:~/devstack$ OS_USERNAME=admin OS_TENANT_NAME=admin USER_PASSWORD=wxcvbn swift -A http://192.168.1.47:5000/v2.0 list admincontainer I hope that will help you. Regards

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-02-26 15:09:02 -0500

Seen: 77 times

Last updated: Feb 27 '13