Dashboard gets down when Murano API service is not running

Bug #1381456 reported by Ekaterina Chernova on 2014-10-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
High
Ekaterina Chernova
python-muranoclient
High
Ekaterina Chernova

Bug Description

1) Disable Murano API service
2) Open Murano - Environments tab

The error is not caught and the trace is appeared:
nvironment.

The root cause is in exception get renamed from CommunicationError to ConnectionError

In normal behaviour just error message with information about API not running should appears.

Request Method: GET
Request URL: http://localhost:8080/murano/environments

Django Version: 1.6.7
Python Version: 2.7.6
Installed Applications:
['openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.identity',
 'openstack_dashboard.dashboards.settings',
 'openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django_pyscss',
 'openstack_dashboard.django_pyscss_fix',
 'compressor',
 'horizon',
 'openstack_auth',
 'muranodashboard',
 'floppyforms']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'muranodashboard.middleware.ExceptionMiddleware')

Traceback:
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/fervent/Projects/murano-dashboard/horizon/decorators.py" in dec
  36. return view_func(request, *args, **kwargs)
File "/home/fervent/Projects/murano-dashboard/horizon/decorators.py" in dec
  84. return view_func(request, *args, **kwargs)
File "/home/fervent/Projects/murano-dashboard/horizon/decorators.py" in dec
  52. return view_func(request, *args, **kwargs)
File "/home/fervent/Projects/murano-dashboard/horizon/decorators.py" in dec
  36. return view_func(request, *args, **kwargs)
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/django/views/generic/base.py" in view
  69. return self.dispatch(request, *args, **kwargs)
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  87. return handler(request, *args, **kwargs)
File "/home/fervent/Projects/murano-dashboard/horizon/tables/views.py" in get
  157. handled = self.construct_tables()
File "/home/fervent/Projects/murano-dashboard/horizon/tables/views.py" in construct_tables
  148. handled = self.handle_table(table)
File "/home/fervent/Projects/murano-dashboard/horizon/tables/views.py" in handle_table
  120. data = self._get_data_dict()
File "/home/fervent/Projects/murano-dashboard/horizon/tables/views.py" in _get_data_dict
  185. self._data = {self.table_class._meta.name: self.get_data()}
File "/home/fervent/Projects/murano-dashboard/muranodashboard/environments/views.py" in get_data
  45. environments = api.environments_list(self.request)
File "/home/fervent/Projects/murano-dashboard/muranodashboard/environments/api.py" in environments_list
  152. environments = client.environments.list()
File "/home/fervent/Projects/murano-dashboard/muranoclient/v1/environments.py" in list
  38. return self._list('/v1/environments', 'environments')
File "/home/fervent/Projects/murano-dashboard/muranoclient/common/base.py" in _list
  53. resp, body = self.api.json_request('GET', url, headers=headers)
File "/home/fervent/Projects/murano-dashboard/muranoclient/common/http.py" in json_request
  239. resp = self._http_request(url, method, **kwargs)
File "/home/fervent/Projects/murano-dashboard/muranoclient/common/http.py" in _http_request
  173. **kwargs)
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/requests/api.py" in request
  49. return session.request(method=method, url=url, **kwargs)
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/requests/sessions.py" in request
  457. resp = self.send(prep, **send_kwargs)
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/requests/sessions.py" in send
  569. r = adapter.send(request, **kwargs)
File "/home/fervent/Projects/murano-dashboard/.tox/venv/local/lib/python2.7/site-packages/requests/adapters.py" in send
  407. raise ConnectionError(err, request=request)

Exception Type: ConnectionError at /murano/environments
Exception Value: ('Connection aborted.', error(111, 'Connection refused'))

Changed in murano:
assignee: nobody → Ekaterina Chernova (efedorova)
milestone: none → juno-rc3
status: New → Confirmed
importance: Undecided → Critical

Fix proposed to branch: master
Review: https://review.openstack.org/128609

Changed in murano:
status: Confirmed → In Progress
summary: - Dashboard gets down when Murano PAI service is not running
+ Dashboard gets down when Murano API service is not running
Changed in murano:
milestone: juno-rc3 → kilo-1
Ruslan Kamaldinov (ruhe) on 2014-11-14
Changed in python-muranoclient:
assignee: nobody → Ekaterina Chernova (efedorova)
milestone: none → 0.5.6
Ruslan Kamaldinov (ruhe) on 2014-11-14
Changed in python-muranoclient:
importance: Undecided → High
Changed in murano:
importance: Critical → High

Reviewed: https://review.openstack.org/128609
Committed: https://git.openstack.org/cgit/stackforge/python-muranoclient/commit/?id=fe68b031803b98b0675c689e19e4645b4a520399
Submitter: Jenkins
Branch: master

commit fe68b031803b98b0675c689e19e4645b4a520399
Author: Ekaterina Chernova <email address hidden>
Date: Wed Oct 15 15:21:35 2014 +0400

    Catch ConnectionError exception from requests

    Change-Id: I265eead799381f7fe23d8abf9ace31d96f1f6528
    Closes-Bug: #1381456

Changed in murano:
status: In Progress → Fix Committed
Changed in python-muranoclient:
status: New → Fix Committed
Changed in murano:
status: Fix Committed → Fix Released
no longer affects: python-muranoclient
Changed in python-muranoclient:
importance: Undecided → High
status: New → Confirmed
status: Confirmed → Fix Committed
assignee: nobody → Ekaterina Chernova (efedorova)
milestone: none → 0.5.6
Changed in murano:
milestone: kilo-1 → 2015.1.0
Changed in python-muranoclient:
status: Fix Committed → Fix Released
tags: added: juno-backport-potential
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers