swift juno permission denied error

asked 2015-02-09 13:30:19 -0500

mr_aliagha gravatar image

I did try to install and configure swift juno with one proxy node (controller) and two object storage node. (CentOS 7) After i tried to verify the installation process I have found out that there is some problem with the installation. The output of swift stat command looks normal but when I tried to create storage container in order to upload some file this error showed up:

Error trying to create container 'demo-container1': 404 Not Found: <html><h1>Not Found</h1><p>The resource could not be found.<
Object PUT failed: http://controller:8080/v1/AUTH_699fcdbd76d64bd184fc948ac1e9b32c/demo-container1/root/centos-indexhtml-7-9.el7.centos.noarch.rpm 404 Not Found  [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be found.<

I did check the service logs on the proxy server side, here is the output of proxy-server service:

Feb 09 22:27:57 controller proxy-server[2522]: Container GET returning 503 for (503, 503, 503) (txn: tx96539e1fc77640fd99898-0054d90335) (client_ip: 10.102.1.70)
Feb 09 22:27:57 controller proxy-server[2522]: Could not autocreate account '/AUTH_699fcdbd76d64bd184fc948ac1e9b32c' (txn: tx96539e1fc77640fd99898-0054d90335) (client_ip: 10.102.1.70)

On the storage node here are the logs of different services: object-auditor service:

Feb 09 22:32:36 object1 object-auditor[2115]: Begin object audit "forever" mode (ALL)
Feb 09 22:32:36 object1 object-auditor[2115]: ERROR: Unable to run auditing: [Errno 13] Permission denied: '/srv/node/sdc1'

object-replicator service:

Feb 09 22:33:04 object1 object-replicator[872]: ERROR creating /srv/node/sdb1/objects: #012Traceback (most recent call last):#012  File "/usr/lib/python2.7/site-packages/swift/obj/replicator.py", line 428, in process_repl#012    mkdirs(obj_path)#012  File "/usr/lib/python2.7/site-packages/swift/common/utils.py", line 770, in mkdirs#012    os.makedirs(path)#012  File "/usr/lib64/python2.7/os.py", line 157, in makedirs#012    mkdir(name, mode)#012OSError: [Errno 13] Permission denied: '/srv/node/sdb1/objects'
Feb 09 22:33:04 object1 object-replicator[872]: ERROR creating /srv/node/sdc1/objects: #012Traceback (most recent call last):#012  File "/usr/lib/python2.7/site-packages/swift/obj/replicator.py", line 428, in process_repl#012    mkdirs(obj_path)#012  File "/usr/lib/python2.7/site-packages/swift/common/utils.py", line 770, in mkdirs#012    os.makedirs(path)#012  File "/usr/lib64/python2.7/os.py", line 157, in makedirs#012    mkdir(name, mode)#012OSError: [Errno 13] Permission denied: '/srv/node/sdc1/objects'

object-updater service:

Feb 09 22:23:38 object1 object-updater[2017]: UNCAUGHT EXCEPTION#012Traceback (most recent call last):#012  File "/usr/bin/swift-object-updater", line 23, in <module>#012    run_daemon(ObjectUpdater, conf_file, **options)#012  File "/usr/lib/python2.7/site-packages/swift/common/daemon.py", line 110, in run_daemon#012    klass(conf).run(once=once, **kwargs)#012  File "/usr/lib/python2.7/site-packages/swift/common/daemon.py", line 57, in run#012    self.run_forever(**kwargs)#012  File "/usr/lib/python2.7/site-packages/swift/obj/updater.py", line 91, in run_forever#012    self.object_sweep(os.path.join(self.devices, device))#012  File "/usr/lib/python2.7/site-packages/swift/obj ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2015-03-22 10:27:55 -0500

Guillaume gravatar image

updated 2015-03-22 10:38:54 -0500

Hi,

Define the right SELinux security context to /srv/node solved the problem for me : restorecon -R /srv/node

https://access.redhat.com/documentati...

edit flag offensive delete link more

Comments

Worked like a charm on Openstack Kilo with CentOS 7. Thank you

Gerardo-Alfredo gravatar imageGerardo-Alfredo ( 2015-09-16 09:55:01 -0500 )edit
0

answered 2015-03-18 04:13:37 -0500

Rajeshwar Mukund gravatar image

updated 2015-03-18 04:42:51 -0500

Hi,

I had similar issue on Juno Installed on CentOS7 with installed openstack-selinux package on all the nodes. swift status gives proper o/p

controller# swift stat

Account: AUTH_bc9cc52bebeb45c2ab28d7383825a796 Containers: 0 Objects: 0 Bytes: 0 X-Put-Timestamp: 1426669625.07044 X-Timestamp: 1426669625.07044 X-Trans-Id: txb177c770439d482094ff0-0055094038 Content-Type: text/plain; charset=utf-8

controller#

But while uploading file in swift throws exception like

Error trying to create container 'demo-container1': 404 Not Found: ...Not Found...The resource could not be found.< Object PUT failed: http://controller:8080/v1/AUTH_699fcd... 404 Not Found [first 60 chars of response] ...Not FoundThe resource could not be found.

By disabling selinux on controller & object storage nodes solve the issue :)

edit flag offensive delete link more
0

answered 2015-03-10 01:03:57 -0500

same question to me, I am digging into it, I found the object service run as swift:swift, and when os.listdir("/srv/node/xxx") the service will throw a exception "Permission denied"

but the wired thing is, I create a brand new service, run as swift:swift, and then os.listdir("/srv/node/xxx"), and everything is OK! I am confused now. If you get any progress on it, please let me know, thank you very much.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-02-09 13:30:19 -0500

Seen: 2,569 times

Last updated: Mar 22 '15