Dashboard raises a ServiceCatalogException when attempting to download juju settings

Bug #1033920 reported by Andrew Glen-Young
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
horizon (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

When attempting to download the juju settings file from the dashboard I receive an exception¹ which displays an ugly, blank 500 error message.

It seems that the juju module is expecting an S3 endpoint in my service catalog, not finding it and throwing an exception which is not properly caught. This means that I need to reload the page to remove the blank page and continue to use the dashboard.

What I expect:

I expect the exception to be thrown (as I do not have the required endpoint) and an explanation that there was an error with the endpoint and for the user to be able to use the dashboard without having to reload the page.

Exception:

[1]: After setting DEBUG=True I see the following ServiceCatalogException from Django:

Environment:

Request Method: POST
Request URL: http://localhost:8000/settings/juju/

Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['openstack_dashboard',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_nose',
 'horizon',
 'horizon.dashboards.nova',
 'horizon.dashboards.syspanel',
 'horizon.dashboards.settings']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'openstack_dashboard.middleware.DashboardLogUnhandledExceptionsMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  40. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  55. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  40. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  47. return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  68. return handler(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py" in post
  84. return self.get(self, request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py" in get
  64. form, handled = self.maybe_handle()
File "/usr/lib/python2.7/dist-packages/horizon/forms/views.py" in maybe_handle
  59. self.form, self.handled = form.maybe_handle(self.request, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/forms/base.py" in maybe_handle
  101. exceptions.handle(request)
File "/usr/lib/python2.7/dist-packages/horizon/forms/base.py" in maybe_handle
  99. return form, form.handle(request, form.cleaned_data)
File "/usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py" in handle
  88. redirect=request.build_absolute_uri())
File "/usr/lib/python2.7/dist-packages/horizon/dashboards/settings/juju/forms.py" in handle
  81. 's3_url': api.url_for(request, 's3'),
File "/usr/lib/python2.7/dist-packages/horizon/api/base.py" in url_for
  112. raise exceptions.ServiceCatalogException(service_type)

Exception Type: ServiceCatalogException at /settings/juju/
Exception Value: Invalid service catalog service: s3

System settings:

$ dpkg-query --show *dashboard*
openstack-dashboard 2012.1-0ubuntu8.1
openstack-dashboard-ubuntu-theme 2012.1-0ubuntu8.1

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"

Tags: canonistack
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in horizon (Ubuntu):
status: New → Confirmed
Dave Walker (davewalker)
Changed in horizon (Ubuntu):
status: Confirmed → Fix Released
Changed in horizon (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Andrew or anyone else affected-

Horizon 2012.1.3+stable~20120815-691dd2-0ubuntu1 was accepted into precise-proposed and contains a fix for this. Its progress through SRU is being tracked as part of a batch update of the Openstack components. Please see Bug #1041120.

In the meantime, can you or anyone else affected please manually verify the issue is resolved and post back here? See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

Thanks!

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 2012.1.3+stable~20120815-691dd2-0ubuntu1

---------------
horizon (2012.1.3+stable~20120815-691dd2-0ubuntu1) precise-proposed; urgency=low

  [ Chuck Short ]
  * New upstream release (LP: #1041120):
    - 9b22d6 - Fixed validation check for ICMP rules. (LP: #997669)
  * Dropped:
    - debian/patches/CVE-2012-2094.patch: No longer needed.
    - debian/patches/CVE-2012-2144.patch: No longer needed.

   [ Adam Gandelman ]
   * debian/patches/juju_panel-handle_catalog_exception.patch: Gracefully handle
    missing endpoints in Keystone catalog during Juju environmnets.yaml
    generation. (LP: #1033920)
 -- Adam Gandelman <email address hidden> Tue, 24 Aug 2012 03:27:33 -0500

Changed in horizon (Ubuntu Precise):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.