← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1267414] [NEW] The stack detail view (/project/stacks/stack/1eb55f99-1a06-431c-9e4a-51f80e88c0d3/) throws a KeyError exception for 'stack_id'

 

Public bug reported:

The stack trace is below. The attached patch fixes the issue for me.

Environment:


Request Method: GET
Request URL: https://openstack.example.com/project/stacks/stack/1eb55f99-1a06-431c-9e4a-51f80e88c0d3/

Django Version: 1.5.4
Python Version: 2.7.3
Installed Applications:
['openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'compressor',
 'horizon',
 'openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.settings',
 'openstack_auth',
 'openstack_dashboard.dashboards.router',
 'openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.settings']
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')


Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
  38.         return view_func(request, *args, **kwargs)
File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
  54.             return view_func(request, *args, **kwargs)
File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
  38.         return view_func(request, *args, **kwargs)
File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
  86.                 return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  86.         return handler(request, *args, **kwargs)
File "/srv/gunicorn/horizon/horizon/tabs/views.py" in get
  71.         context = self.get_context_data(**kwargs)
File "/srv/gunicorn/horizon/openstack_dashboard/dashboards/project/stacks/views.py" in get_context_data
  101.         context["stack"] = self.get_data(self.request)
File "/srv/gunicorn/horizon/horizon/utils/memoized.py" in wrapped
  90.             value = cache[key] = func(*args, **kwargs)
File "/srv/gunicorn/horizon/openstack_dashboard/dashboards/project/stacks/views.py" in get_data
  106.         stack_id = kwargs['stack_id']

Exception Type: KeyError at /project/stacks/stack/1eb55f99-1a06-431c-9e4a-51f80e88c0d3/
Exception Value: 'stack_id'

** Affects: horizon
     Importance: Undecided
         Status: New


** Tags: heat stacks

** Patch added: "0001-project-stacks-Pass-kwargs-to-DetailView.get_data.patch"
   https://bugs.launchpad.net/bugs/1267414/+attachment/3944185/+files/0001-project-stacks-Pass-kwargs-to-DetailView.get_data.patch

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1267414

Title:
  The stack detail view (/project/stacks/stack/1eb55f99-1a06-431c-9e4a-
  51f80e88c0d3/) throws a KeyError exception for 'stack_id'

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  The stack trace is below. The attached patch fixes the issue for me.

  Environment:

  
  Request Method: GET
  Request URL: https://openstack.example.com/project/stacks/stack/1eb55f99-1a06-431c-9e4a-51f80e88c0d3/

  Django Version: 1.5.4
  Python Version: 2.7.3
  Installed Applications:
  ['openstack_dashboard',
   'django.contrib.contenttypes',
   'django.contrib.auth',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.humanize',
   'compressor',
   'horizon',
   'openstack_dashboard.dashboards.project',
   'openstack_dashboard.dashboards.admin',
   'openstack_dashboard.dashboards.settings',
   'openstack_auth',
   'openstack_dashboard.dashboards.router',
   'openstack_dashboard.dashboards.project',
   'openstack_dashboard.dashboards.admin',
   'openstack_dashboard.dashboards.settings']
  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')

  
  Traceback:
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
    115.                         response = callback(request, *callback_args, **callback_kwargs)
  File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
    38.         return view_func(request, *args, **kwargs)
  File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
    54.             return view_func(request, *args, **kwargs)
  File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
    38.         return view_func(request, *args, **kwargs)
  File "/srv/gunicorn/horizon/horizon/decorators.py" in dec
    86.                 return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view
    68.             return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
    86.         return handler(request, *args, **kwargs)
  File "/srv/gunicorn/horizon/horizon/tabs/views.py" in get
    71.         context = self.get_context_data(**kwargs)
  File "/srv/gunicorn/horizon/openstack_dashboard/dashboards/project/stacks/views.py" in get_context_data
    101.         context["stack"] = self.get_data(self.request)
  File "/srv/gunicorn/horizon/horizon/utils/memoized.py" in wrapped
    90.             value = cache[key] = func(*args, **kwargs)
  File "/srv/gunicorn/horizon/openstack_dashboard/dashboards/project/stacks/views.py" in get_data
    106.         stack_id = kwargs['stack_id']

  Exception Type: KeyError at /project/stacks/stack/1eb55f99-1a06-431c-9e4a-51f80e88c0d3/
  Exception Value: 'stack_id'

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1267414/+subscriptions


Follow ups

References