error creating container in openstack swift

asked 2014-05-28 07:47:31 -0600

Sagar gravatar image

updated 2014-06-02 01:17:09 -0600

I am trying to install the latest version of swift following instructions from http://docs.openstack.org/icehouse/in... . I am able to authenticate with keystone and also able to successfully run the command swift stat. But, when I run the command swift upload myfiles temp, I get the following error

Error trying to create container 'myfiles': 404 Not Found: {"error": {"message": "The 
resource could not be found.", "c
Object PUT failed: 9.109.124.109:5000:5000/v2.0/myfiles/temp 400 Bad Request 
[first 60 chars of response] {"error": {"message": "Expecting to find application/json 
in

In /var/log/syslog, I find the following information:

May 28 18:11:40 datafed3 account-server: ERROR __call__ error with PUT /sdb1/100869
/AUTH_system/myfiles : #012Traceback (most recent call last):#012  File "/usr/lib
/python2.7/dist-packages/swift/account/server.py", line 284, in __call__#012    res = 
method(req)#012  File "/usr/lib/python2.7/dist-packages/swift/common/utils.py", line 
2217, in wrapped#012    return func(*a, **kw)#012  File "/usr/lib/python2.7/dist-
packages/swift/common/utils.py", line 837, in _timing_stats#012    resp = func(ctrl, 
*args, **kwargs)#012  File "/usr/lib/python2.7/dist-packages/swift/account/server.py", 
line 128, in PUT#012    req.headers['x-bytes-used'])#012  File "/usr/lib/python2.7/dist-
packages/swift/account/backend.py", line 210, in put_container#012    raise 
DatabaseConnectionError(self.db_file, "DB doesn't exist")#012DatabaseConnectionError: 
DB connection error (/srv/node/sdb1/accounts/100869/80d/62816079be0fc97a4557f52b3b12380d
/62816079be0fc97a4557f52b3b12380d.db, 0):#012DB doesn't exist

The output of the commands swift-ring-builder account.builder, swift-ring-builder container.builder and swift-ring-builder object.builder, respectively, are

account.builder, build version 4
262144 partitions, 3.000000 replicas, 2 regions, 4 zones, 4 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices:    id  region  zone      ip address  port  replication ip  replication port      name weight partitions balance meta
             0       1     1     9.126.113.160  6002   9.126.113.160              6002      sdb1 100.00     196608    0.00 
             1       1     2   9.126.113.161  6002   9.126.113.161              6002      sdb1 100.00     196608    0.00 
             2       2     1   9.109.124.109  6002   9.109.124.109              6002      sdb1 100.00     196608    0.00 
             3       2     2   9.109.124.110  6002   9.109.124.110              6002      sdb1 100.00     196608    0.00

container.builder, build version 4
262144 partitions, 3.000000 replicas, 2 regions, 4 zones, 4 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices:    id  region  zone      ip address  port  replication ip  replication port      name weight partitions balance meta
         0       1     1   9.126.113.160  6001   9.126.113.160              6001      sdb1 100.00     196608    0.00 
         1       1     2   9.126.113.161  6001   9.126.113.161              6001      sdb1 100.00     196608    0.00 
         2       2     1   9.109.124.109  6001   9.109.124.109              6001      sdb1 100.00     196608    0.00 
         3       2     2 ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please post the outputs of the following commands. You will need to be in the directory containing your ring builder files. (Probably /etc/swift/)

swift-ring-builder account.builder

swift-ring-builder container.builder

swift-ring-builder object.builder

SamYaple ( 2014-05-28 07:56:05 -0600 )edit

I tried to run swift-ring-builder account.builder rebalance, but I get an error No partitions could be reassigned. Either none need to be or none can be due to min_part_hours [1]., although it has been days, since I reassigned the last time.

Sagar ( 2014-05-28 23:12:12 -0600 )edit

Hmm. If I a mreading that output correctly, you have two regions with 2 zones each? So one disk per zone? The balancing mechanisim wont be able to do anything in this case. I would begin by adding more than one disk per zone.

This doesn't immediately explain to me why you are getting the error in your initial post, but I would be willing to bet that if you build up that cluster, the error would go away.

SamYaple ( 2014-05-29 07:52:42 -0600 )edit

Yes, I have 2 regions with 2 zones each and one disk per zone. I have only 4 virtual machines, so by your suggestion, I will try to have 2 regions with one zone each and 2 devices per zone (I wanted to experiment with regions, so cannot have just 1 region).

Sagar ( 2014-05-29 10:11:58 -0600 )edit

I tried with the new configuration too, but got the same error.

Sagar ( 2014-05-30 00:56:10 -0600 )edit