I was following the https://github.com/swiftstack/kinetic-swift/wiki/Deployment page to deploy Swift using Kinetic drives.
After creating the account, container, and object rings I started Swift using “swift-init start main”. The Swift processes came up fine, and I was also able to do “swift stat”.
Next, when I tried to create a container called foobar, I got this error message.
Looking at /var/log/syslog showed that there was an issue with creating the accounts directory in /swift/sdv due to permission issues.
Fix:
After creating the account, container, and object rings I started Swift using “swift-init start main”. The Swift processes came up fine, and I was also able to do “swift stat”.
Next, when I tried to create a container called foobar, I got this error message.
user@vm:~$ sudo swift -U test:tester -K testing -A http://localhost:8080/auth/v1.0 post foobar Container PUT failed: http://localhost:8080/v1/AUTH_test/foobar 404 Not Found [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be found.< |
Looking at /var/log/syslog showed that there was an issue with creating the accounts directory in /swift/sdv due to permission issues.
user@vm:~$ tail -f /var/log/syslog Oct 21 15:22:34 vm account-server: ERROR __call__ error with PUT /sdv/802/AUTH_test : #012Traceback (most recent call last):#012 File "/home/user/git/kinetic-swift/swift/swift/account/server.py", line 274, in __call__#012 res = method(req)#012 File "/home/user/git/kinetic-swift/swift/swift/common/utils.py", line 2422, in wrapped#012 return func(*a, **kw)#012 File "/home/user/git/kinetic-swift/swift/swift/common/utils.py", line 1023, in _timing_stats#012 resp = func(ctrl, *args, **kwargs)#012 File "/home/user/git/kinetic-swift/swift/swift/account/server.py", line 142, in PUT#012 broker.initialize(timestamp.internal)#012 File "/home/user/git/kinetic-swift/swift/swift/common/db.py", line 232, in initialize#012 mkdirs(self.db_dir)#012 File "/home/user/git/kinetic-swift/swift/swift/common/utils.py", line 740, in mkdirs#012 os.makedirs(path)#012 File "/usr/lib/python2.7/os.py", line 150, in makedirs#012 makedirs(head, mode)#012 File "/usr/lib/python2.7/os.py", line 150, in makedirs#012 makedirs(head, mode)#012 File "/usr/lib/python2.7/os.py", line 150, in makedirs#012 makedirs(head, mode)#012 File "/usr/lib/python2.7/os.py", line 157, in makedirs#012 mkdir(name, mode)#012OSError: [Errno 13] Permission denied: '/swift/sdv/accounts' (txn: txc2152db00f0a4ee5ba0b8-005446dcaa) Oct 21 15:22:34 vm account-server: 127.0.0.1 - - [21/Oct/2014:22:22:34 +0000] "PUT /sdv/802/AUTH_test" 500 1132 "-" "txc2152db00f0a4ee5ba0b8-005446dcaa" "-" 0.0143 "-" Oct 21 15:22:34 vm proxy-server: Container GET returning 503 for (503,) (txn: txc2152db00f0a4ee5ba0b8-005446dcaa) (client_ip: 127.0.0.1) Oct 21 15:22:34 vm proxy-server: Could not autocreate account '/AUTH_test' (txn: txc2152db00f0a4ee5ba0b8-005446dcaa) (client_ip: 127.0.0.1) Oct 21 15:22:34 vm proxy-server: 127.0.0.1 127.0.0.1 21/Oct/2014/22/22/34 PUT /v1/AUTH_test/foobar HTTP/1.0 404 - python-swiftclient-1.8.0.7.g775a24b AUTH_tkceea92749... - 70 - txc2152db00f0a4ee5ba0b8-005446dcaa - 0.0204 - - 1413930154.009783983 1413930154.030232906 user@vm:/swift$ ls -l total 4 d-wxrw-r-t 2 root root 4096 Oct 17 16:04 |
Fix:
user@vm:/swift$ sudo chmod o+rw /swift/sdv |