"Something went wrong" error when getting 'Deployments -> Show History' page without dashboard

Bug #1455529 reported by Anastasia Kuznetsova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Low
Ekaterina Chernova
Kilo
Fix Committed
Medium
Kirill Zaitsev
Liberty
Fix Released
Medium
Kirill Zaitsev

Bug Description

Steps to reproduce:
1. Create one user in admin tenant
2. Create Murano environment
3. Add some applications to it and send it to deploy
4. Click on "Deployment History" > "Show details"

Observed result:
Something went wrong!

An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.

Here a traceback from dashboard log: http://paste.openstack.org/show/223846/

---------
In wizard done() method the special key is adding

        storage = attributes.setdefault('?', {}).setdefault(
            consts.DASHBOARD_ATTRS_KEY, {})
        storage['name'] = app_name

And in the environment/tables.py it's requested without checking

    _type = tables.Column(
        lambda datum: datum['?'][consts.DASHBOARD_ATTRS_KEY]['name'],
        verbose_name=_('Type'))

Need to add key check before accessing it

Changed in murano:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 2015.1.1
assignee: nobody → Ekaterina Chernova (efedorova)
summary: - "Something went wrong" error when user navigates to deployment history
- of env that was deployed from another session
+ "Something went wrong" error when getting 'Deployments -> Show History'
+ page without dashboard
Changed in murano:
importance: Medium → Low
description: updated
Changed in murano:
assignee: Ekaterina Chernova (efedorova) → nobody
Changed in murano:
milestone: 2015.1.1 → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

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

Changed in murano:
assignee: nobody → Ekaterina Chernova (efedorova)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (master)

Reviewed: https://review.openstack.org/184819
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=eeeb3adee8a63d3c151c7611e3597a9229df1169
Submitter: Jenkins
Branch: master

commit eeeb3adee8a63d3c151c7611e3597a9229df1169
Author: Ekaterina Chernova <email address hidden>
Date: Thu May 21 19:30:00 2015 +0300

    Prevent key error occurred on deployment history tab

    Dashboard keeps app type on object model special key.
    If type is needed to be shown like on Deployment details page,
    it requested by that key.
    But is the deployment was made by API call, type is not available.
    So error was occurred.

    Change-Id: I95d9bb23e0758b86ee503df17e97d041ac56a841
    Closes-Bug: #1455529

Changed in murano:
status: In Progress → Fix Committed
tags: added: kilo-backport-potential
Changed in murano:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/200270

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (stable/kilo)

Reviewed: https://review.openstack.org/200270
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=156cccc3f1d19812f8c6ae72b548a5c1041adc5c
Submitter: Jenkins
Branch: stable/kilo

commit 156cccc3f1d19812f8c6ae72b548a5c1041adc5c
Author: Ekaterina Chernova <email address hidden>
Date: Thu May 21 19:30:00 2015 +0300

    Prevent key error occurred on deployment history tab

    Dashboard keeps app type on object model special key.
    If type is needed to be shown like on Deployment details page,
    it requested by that key.
    But is the deployment was made by API call, type is not available.
    So error was occurred.

    Change-Id: I95d9bb23e0758b86ee503df17e97d041ac56a841
    Closes-Bug: #1455529

tags: added: in-stable-kilo
Revision history for this message
Anastasia Kuznetsova (akuznetsova) wrote :
Download full text (4.2 KiB)

The same problem is appears after adding new feature that allows users to deploy environment via CLI.
Steps to reproduce:
1. create env via cli
2. create session for this env via cli
3. add apps to the env
4. deploy session

After deploy log in Web UI and go to the deployed env. Click on the service name:
Environment:

Request Method: GET
Request URL: http://host/dashboard/murano/12b4e0cb9f694826ac5d5401f44997b6/1f5b2888db0346a09346d8469e657427/

Django Version: 1.8.4
Python Version: 2.7.6
Installed Applications:
['openstack_dashboard.dashboards.project',
 'openstack_dashboard.contrib.sahara.content.data_processing',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.identity',
 'openstack_dashboard.dashboards.settings',
 'muranodashboard',
 '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']
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',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'muranodashboard.middleware.ExceptionMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  36. return view_func(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  52. return view_func(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  36. return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  71. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  89. return handler(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tabs/views.py" in get
  146. context = self.get_context_data(**kwargs)
File "/opt/stack/murano-dashboard/muranodashboard/environments/views.py" in get_context_data
  102. context = super(DetailServiceView, self).get_context_data(**kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in get_context_data
  107. context = super(MultiTableMixin, self).get_context_data(**kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tabs/views.py" in get_context_data
  56. exceptions.handle(self.reque...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/230992

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (stable/liberty)

Reviewed: https://review.openstack.org/230992
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=a2ea86a366b1bfcd367bedb0e1ff00460be7e77f
Submitter: Jenkins
Branch: stable/liberty

commit a2ea86a366b1bfcd367bedb0e1ff00460be7e77f
Author: Kirill Zaitsev <email address hidden>
Date: Mon Oct 5 16:23:56 2015 +0300

    Prevent key error on deployed app detail page

    Dashboard keeps app type on object model special key.
    But if deployment was made via API call, that key may not exist.

    This commit allows the code to tolerate absence of the key

    Change-Id: I76525327a540e44d51ed252f8668388dbf8cfdfc
    Closes-Bug: #1455529

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (master)

Reviewed: https://review.openstack.org/230990
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=b3b2f1e9098b2b9fcacdae2fe81ef539817b6adf
Submitter: Jenkins
Branch: master

commit b3b2f1e9098b2b9fcacdae2fe81ef539817b6adf
Author: Kirill Zaitsev <email address hidden>
Date: Mon Oct 5 16:23:56 2015 +0300

    Prevent key error on deployed app detail page

    Dashboard keeps app type on object model special key.
    But if deployment was made via API call, that key may not exist.

    This commit allows the code to tolerate absence of the key

    Change-Id: I76525327a540e44d51ed252f8668388dbf8cfdfc
    Closes-Bug: #1455529

Changed in murano:
milestone: liberty-1 → 1.0.0
Changed in murano:
milestone: 1.0.0 → 1.0.1
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/murano-dashboard 2015.1.1

This issue was fixed in the openstack/murano-dashboard 2015.1.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/murano-dashboard 2015.1.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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