Ask Your Question
0

unable to create containers

asked 2013-09-19 07:57:09 -0500

raheel-com88 gravatar image

Dear All,

I installed a Swift on Ubuntu 12.04 using this guide: http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...)

Everything worked fine upto this document. I am able to authenticate and list containers but was unable to create containers using both curl and swift client.

Here is the errors I get when I try to create containers:

swift -A https://10.0.0.200/auth/v1.0 -U test:tester -K testing post newcontainer

Container PUT failed: https://10.0.0.200:443/v1/AUTH_test/newcontainer (https://10.0.0.200:443/v1/AUTH_test/n...) 404 Not Found [first 60 chars of response]

Not Found

The resource could not be found.<

curl -k -X PUT -H 'X-Auth-Token: AUTH_tk096c7d1f579e4f2ba6b7623c6b06aae8' https://10.0.0.200/v1.0/AUTH_test/myfolder (https://10.0.0.200/v1.0/AUTH_test/myf...)

<html>

Not Found

The resource could not be found.

</html>

I tried alot but no use. Anyone can help me on this?

Regards, Raheel

edit retag flag offensive close merge delete

8 answers

Sort by ยป oldest newest most voted
1

answered 2013-09-20 07:59:58 -0500

raheel-com88 gravatar image

Actually account autocreate is not failing. Problem is with permission on /srv/[1-4]/. I corrected the permission and it's solved now.

edit flag offensive delete link more

Comments

That was my guess too. Typically /srv/node/xxx are mounted, so _they_ get the permissions, but not the mount point itself. In SAIO, however, you chown the /srv/node/xxx without mounting anything.

zaitcev gravatar imagezaitcev ( 2015-01-29 13:56:02 -0500 )edit
0

answered 2013-09-19 16:07:05 -0500

clay-gerrard gravatar image

A 404 on a PUT means the "group of things" above the request failed the existence check. So if you get a 404 on object PUT it's because the proxy failed the container existence check. If you get a 404 on a container PUT it's because the proxy failed the account existence check.

Check the following:

1) are you running account_autocreate? You should, it is normally on by default [1] 2) are you running with 0 recheck_account_existence? 'cause that's broken [2]

I'm curious if when you list/stat the account does it have any containers in it? Swift will lazy provision authorized accounts, and that code has been worked on in the last development cycle. If you have containers/objects in then the account definitely has a real physical data file and then it definitely exists - but if there's no data in the account it can mean different things from a troubleshooting perspective. There may be some backend error talking to the account servers - if you're unable to resolve the issue thoroughly examine any ERROR lines from /var/log/syslog for messages relating to problems connecting to account servers.

  1. http://docs.openstack.org/developer/swift/deployment_guide.html#proxy-server-configuration (http://docs.openstack.org/developer/s...)
  2. see: https://bugs.launchpad.net/swift/+bug/1224734 (https://bugs.launchpad.net/swift/+bug...)
edit flag offensive delete link more
0

answered 2013-09-19 19:28:35 -0500

clay-gerrard gravatar image

Wait what solved your issue? Was the account autocreate failing and you didn't get a server error - cause that may be a bug?

edit flag offensive delete link more
0

answered 2013-09-19 17:45:31 -0500

raheel-com88 gravatar image

Sorry it's solved now. It was due to a permission issue. Anyways thanks for the guidance.

edit flag offensive delete link more
0

answered 2013-09-19 17:45:50 -0500

raheel-com88 gravatar image

Thanks clayg, that solved my question.

edit flag offensive delete link more
0

answered 2013-09-23 20:05:01 -0500

clay-gerrard gravatar image

well, I think the whole thing would have been better if your container create returned a server error instead of 404 trying to make it sound like it was the clients fault - but I'm glad you got it figured out.

https://bugs.launchpad.net/swift/+bug/1229382 (https://bugs.launchpad.net/swift/+bug...)

edit flag offensive delete link more
0

answered 2015-01-27 12:40:44 -0500

flovax gravatar image

I have the same problem but couldn't find anything. I have basic Juno setup based on the documentation on centos 7. I tun account_autocreate and recheck_account is not set.

[root@controller2 ~]# swift upload myfiles anaconda-ks.cfg Error trying to create container 'myfiles': 404 Not Found: <html>

Not Found

The resource could not be found.< Object HEAD failed: http://controller2:8080/v1/AUTH_0e78569881f941a7803c8bd02dff0232/myfiles/anaconda-ks.cfg (http://controller2:8080/v1/AUTH_0e785...) 400 Bad Request

Jan 27 12:51:25 controller2 proxy-server: 10.3.1.12 10.3.1.12 27/Jan/2015/17/51/25 HEAD /v1/AUTH_0e78569881f941a7803c8bd02dff0232 HTTP/1.0 204 - python-swiftclient-2.3.1 485b8504e5db424e... - - - tx2c547ba73ef94092936b7-0054c7d01d - 0.0058 - - 1422381085.812802076 1422381085.818607092 Jan 27 12:51:25 controller2 proxy-server: 10.3.1.12 10.3.1.12 27/Jan/2015/17/51/25 PUT /v1/AUTH_0e78569881f941a7803c8bd02dff0232/myfiles HTTP/1.0 404 - python-swiftclient-2.3.1 485b8504e5db424e... - 70 - txc78c3b111684410ca0e5a-0054c7d01d - 0.0064 - - 1422381085.857722044 1422381085.864099979 Jan 27 12:51:26 controller2 proxy-server: 10.3.1.12 10.3.1.12 27/Jan/2015/17/51/26 HEAD /v1/AUTH_0e78569881f941a7803c8bd02dff0232/myfiles/anaconda-ks.cfg HTTP/1.0 400 - python-swiftclient-2.3.1 b77e9060798b4874... - - - tx1c50830829674f57b11ca-0054c7d01e - 0.0184 - - 1422381086.065722942 1422381086.084156990

edit flag offensive delete link more
0

answered 2013-09-19 17:38:19 -0500

raheel-com88 gravatar image

I again tried with your suggested modification but it didn't worked at all:

I got this in Logs:

Sep 19 14:33:22 object object-replicator ERROR creating /srv/2/node/sdb2/objects: #012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/replicator.py", line 399, in collect_jobs#012 mkdirs(obj_path)#012 File "/usr/local/lib/python2.7/dist-packages/swift/common/utils.py", line 449, in mkdirs#012 os.makedirs(path)#012 File "/usr/lib/python2.7/os.py", line 157, in makedirs#012 mkdir(name, mode)#012OSError: [Errno 13] Permission denied: '/srv/2/node/sdb2/objects'

How to correct this?

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-09-19 07:57:09 -0500

Seen: 890 times

Last updated: Jan 27 '15