Dashboard user interface for Swift

Asked by Sridhar Gopalaswami

Does Dashboard have a web user interface/object browser for Swift? I see multiple screenshots for Nova in presentation powerpoints on the web but no screenshots for Swift. Just wanted to confirm that this is available. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Dashboard (Horizon) Edit question
Assignee:
No assignee Edit question
Solved by:
Tres Henry
Solved:
Last query:
Last reply:
Revision history for this message
Best Tres Henry (tres) said :
#1

There is a basic UI for managing containers and objects in Horizon. If Swift is configured in the Keystone service catalog the Swift UI will show up in Horizon and can be accessed from the "Containers" menu item in the left-hand nav.

Revision history for this message
Sridhar Gopalaswami (sgopalas) said :
#2

Thanks Tres Henry, that solved my question.

Revision history for this message
Paras (pradhanparas) said :
#3

hi,

I have swift enabled to True in local_settings.py

But I am not seeing anything in Dashbaord.

My endpoint looks like this

swift RegionOne https://192.168.122.14:8080/v1/AUTH_%tenant_id%
keystone RegionOne http://192.168.122.14:5000/v2.0

My swift keystone setup is working.
What am I missing?

Thanks
Paras.

Revision history for this message
Tres Henry (tres) said :
#4

The config setting for showing the Swift UI has been removed. As long as the Swift endpoint is correctly registered in the Keystone service catalog Horizon will show the Swift UI and it should "just work".

Revision history for this message
Paras (pradhanparas) said :
#5

Hi Tres

I am not seeing it in my dashboard . So I am suspecting if my keystone enrty is broken or something. This is my swift endpoint. Does it looks ok?

keystone-manage endpointTemplates add RegionOne swift https://192.168.122.14:8080/v1/AUTH_%tenant_id% https://192.168.122.14:8080/v1.0 https://192.168.122.14:8080/v1/AUTH_%tenant_id% 1 1

Thanks
Paras.

Revision history for this message
Gabriel Hurley (gabriel-hurley) said :
#6

If you're using the E4 release of Keystone, you actually need to add Swift to the catalog template file as opposed to using the "endpointTemplate add" command. Take a look at how DevStack does it: https://github.com/openstack-dev/devstack/blob/master/stack.sh#L1392

Revision history for this message
Paras (pradhanparas) said :
#7

HI

My keystone is diablo. Not E4.

So what am I missing?

Thanks
Paras.

Revision history for this message
Paras (pradhanparas) said :
#8

Ok I can see "Containers" at the left pane now. But when I click it I see this error

--
environment:

Request Method: GET
Request URL: http://192.168.122.14/dash/2/containers/

Django Version: 1.3
Python Version: 2.7.2
Installed Applications:
['dashboard',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_openstack',
 'django_openstack.templatetags',
 'mailer']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django_openstack.middleware.keystone.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'dashboard.middleware.DashboardLogUnhandledExceptionsMiddleware')

Traceback:
File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/pymodules/python2.7/django/contrib/auth/decorators.py" in _wrapped_view
  23. return view_func(request, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/django_openstack/dash/views/containers.py" in index
  74. containers = api.swift_get_containers(request)
File "/usr/lib/pymodules/python2.7/django_openstack/api.py" in swift_get_containers
  775. return [Container(c) for c in swift_api(request).get_all_containers()]
File "/usr/lib/pymodules/python2.7/cloudfiles/connection.py" in get_all_containers
  306. return ContainerResults(self, self.list_containers_info(**parms))
File "/usr/lib/pymodules/python2.7/cloudfiles/connection.py" in list_containers_info
  386. response = self.make_request('GET', [''], parms=parms)
File "/usr/lib/pymodules/python2.7/cloudfiles/connection.py" in make_request
  189. response = retry_request()
File "/usr/lib/pymodules/python2.7/cloudfiles/connection.py" in retry_request
  182. self.connection.request(method, path, data, headers)
File "/usr/lib/python2.7/httplib.py" in request
  955. self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py" in _send_request
  989. self.endheaders(body)
File "/usr/lib/python2.7/httplib.py" in endheaders
  951. self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py" in _send_output
  811. self.send(msg)
File "/usr/lib/python2.7/httplib.py" in send
  773. self.connect()
File "/usr/lib/python2.7/httplib.py" in connect
  1154. self.timeout, self.source_address)
File "/usr/lib/python2.7/dist-packages/eventlet/green/socket.py" in create_connection
  59. raise error, msg

Exception Type: error at /dash/2/containers/
Exception Value: [Errno 111] ECONNREFUSED

--

What did i do wrong?

Thanks
Paras.

Revision history for this message
Gabriel Hurley (gabriel-hurley) said :
#9

If you've gotten that far then you figured out how to add a swift "object-store" service to the keystone catalog. However, if you're getting connection refused errors that means there's something wrong with the end point being returned by keystone. This could be the result of invalid token interpolation in your endpointTemplate string, by a blocked port for that endpoint, a typo in the hostname/IP address, the swift server not running on that host, or any number of other things.

Revision history for this message
Paras (pradhanparas) said :
#10

Accessing swift from CLI (swift command, curl) is working without issue.

Can you check if my endpointTemplates looks ok?

They are here

http://pastebin.com/brgFq3N8

Thanks!
Paras.