swift stat commad doesn't give proper response

asked 2014-01-11 14:09:56 -0600

JakkeL gravatar image

updated 2014-01-14 10:47:42 -0600

torgomatic gravatar image

Hi,

I have installed Swift to SLES 11 SP3 servers, now when I'm running command swift -V 2.0 -A $OS_AUTH_URL -U demo:admin -K $ADMINPASS stat to verify that Swift works properly, command stucks during execution. When used command with --debug found out that proxy server does reply with auth token, but then command stucks to following phase,

DEBUG:iso8601.iso8601:Parsed 2014-01-12T19:33:14Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'19', 'tz_hour': None, 'month': u'01', 'timezone': u'Z', 'second': u'14', 'tz_minute': None, 'year': u'2014', 'separator': u'T', 'day': u'12', 'minute': u'33'} with default timezone <iso8601.iso8601.Utc object at 0xd87f90>
DEBUG:iso8601.iso8601:Got u'2014' for 'year' with default None
DEBUG:iso8601.iso8601:Got u'01' for 'month' with default None
DEBUG:iso8601.iso8601:Got u'12' for 'day' with default None
DEBUG:iso8601.iso8601:Got u'19' for 'hour' with default None
DEBUG:iso8601.iso8601:Got u'33' for 'minute' with default None
DEBUG:iso8601.iso8601:Got u'14' for 'second' with default None

Link to full output of the command ( http://pastebin.ubuntu.com/6734582/ )

Tried to see if either /var/logs/warnings or /var/logs/messages would containg any information, but it seems that Swift doesn't log any errors there-

Also few questions comes to my mind, first when ring creation is initiated, should it populate some kind of directory structure under /srv/node/<dev_name> ? And when storage nodes are set up, shoud one configure account-server.conf, container-server.conf and object-server.conf files? There wasn't any instructions for such action in deployment guide.</dev_name>

edit retag flag offensive close merge delete

Comments

<deleted>.

Kevin C gravatar imageKevin C ( 2014-01-17 23:48:02 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-01-17 23:49:11 -0600

Kevin C gravatar image

Also few questions comes to my mind, first when ring creation is initiated, should it populate some kind of directory structure under /srv/node/<dev_name> ? </dev_name>

You should create the accounts, containers and objects directories owned and writable by Swift in /srv/node/dev/.

And when storage nodes are set up, shoud one configure account-server.conf, container-server.conf and object-server.conf files?

Each storage node should at least have object-server.conf. You only need account-server.conf and container-server.conf on storage nodes that contain accounts and containers. If you have three or less storage nodes then you should have all three conf files on the node. We have a large cluster so we only have accounts and containers running on 9 of the nodes.

edit flag offensive delete link more

Comments

Ok, so those misssing account-server.conf, container-server.conf and object-server.conf files may have something to do with the odd behavior of swift stat command. I'll configure those files (found some examples with google) and try to re-build rings.

JakkeL gravatar imageJakkeL ( 2014-01-19 15:43:05 -0600 )edit

Added those misssing account-server.conf, container-server.conf and object-server.conf files, now when I'm starting swift-init main start,


Starting proxy-server...(/etc/swift/proxy-server.conf)
Starting container-server...(/etc/swift/container-server.conf)
Starting account-server...(/etc/swift/account-server.conf)
Starting object-server...(/etc/swift/object-server.conf)

I Get following errors;


Traceback (most recent call last):
  File "/usr/bin/swift-container-server", line 22, in <module>
    run_wsgi(conf_file, 'container-server', default_port=6001, **options)
  File "/usr/lib64/python2.6/site-packages/swift/common/wsgi.py", line 245, in run_wsgi
    _initrp(conf_path, app_section, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/swift/common/wsgi.py", line 337, in _initrp
    log_route='wsgi')
  File "/usr/lib64/python2.6/site-packages/swift/common/utils.py", line 930, in get_logger
    raise e
socket.error: [Errno 111]

JakkeL gravatar imageJakkeL ( 2014-01-26 17:39:15 -0600 )edit

And this error,


Traceback (most recent call last):
  File "/usr/bin/swift-account-server", line 22, in <module>
    run_wsgi(conf_file, 'account-server', default_port=6002, **options)
  File "/usr/lib64/python2.6/site-packages/swift/common/wsgi.py", line 245, in run_wsgi
    _initrp(conf_path, app_section, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/swift/common/wsgi.py", line 337, in _initrp
    log_route='wsgi')
  File "/usr/lib64/python2.6/site-packages/swift/common/utils.py", line 930, in get_logger
    raise e
socket.error: [Errno 111] Connection refused

JakkeL gravatar imageJakkeL ( 2014-01-26 17:52:24 -0600 )edit

and this one,


Traceback (most recent call last):
  File "/usr/bin/swift-object-server", line 22, in <module>
    run_wsgi(conf_file, 'object-server', default_port=6000, **options)
  File "/usr/lib64/python2.6/site-packages/swift/common/wsgi.py", line 245, in run_wsgi
    _initrp(conf_path, app_section, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/swift/common/wsgi.py", line 337, in _initrp
    log_route='wsgi')
  File "/usr/lib64/python2.6/site-packages/swift/common/utils.py", line 930, in get_logger
    raise e
socket.error: [Errno 111] Connection refused

JakkeL gravatar imageJakkeL ( 2014-01-26 17:52:40 -0600 )edit

Here is link to my account-server.conf, container-server.conf and object-server.conf files files, http://pastebin.ubuntu.com/6823435/%3C/p%3E (http://pastebin.ubuntu.com/6823435/)

JakkeL gravatar imageJakkeL ( 2014-01-26 17:59:21 -0600 )edit

Hi, fixed that service start error that i posted above, that was caused by value log_address = /var/log in the .conf files. As soon as i commented it out services start fine. So now I have all three .conf files in place at all storage nodes, I have rebuild rings and copied new .gz files to all storage nodes. All services are up and running and listening correct ports at all storage nodes. But still when I'm running swift --debug stat command at proxy node, execution of that command stops to this,

JakkeL gravatar imageJakkeL ( 2014-01-27 08:37:48 -0600 )edit
0

answered 2015-02-03 06:44:42 -0600

Hi, Recreate the accounts,container,object rings and add entries to each ring.Verify the ring contents properly and rebalance rings. Now /etc/swift contains account.ring.gz, container.ring.gz, and object.ring.gz. Copy these files to all the Storage nodes in /etc/swift. Then type 'chown -R swift:swift /etc/swift' and restart proxy service. Lastly run the command: swift-init all start. This makes swift stat work correctly. :)

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-01-11 14:09:56 -0600

Seen: 595 times

Last updated: Feb 03 '15