Bug 1288652 - Horizon - Launch an instance on admin project return Internal Server Error
Summary: Horizon - Launch an instance on admin project return Internal Server Error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 7.0 (Kilo)
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: z3
: 7.0 (Kilo)
Assignee: Matthias Runge
QA Contact: Ido Ovadia
URL:
Whiteboard:
: 1287770 (view as bug list)
Depends On: 1287621
Blocks: 1288654
TreeView+ depends on / blocked
 
Reported: 2015-12-04 21:33 UTC by Eric Harney
Modified: 2023-02-22 23:02 UTC (History)
10 users (show)

Fixed In Version: python-django-horizon-2015.1.2-4.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of: 1287621
: 1288654 (view as bug list)
Environment:
Last Closed: 2015-12-21 17:05:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 253496 0 None None None Never
Red Hat Product Errata RHBA-2015:2675 0 normal SHIPPED_LIVE python-django-horizon bug fix advisory 2015-12-21 21:51:29 UTC

Description Eric Harney 2015-12-04 21:33:15 UTC
+++ This bug was initially created as a clone of Bug #1287621 +++

Description of problem:
=======================
Launch an instance (on horizon) on admin project return Internal Server Error


2015-12-02 12:20:52,972 3930 ERROR django.request Internal Server Error: /dashboard/project/instances/launch
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/workflows/views.py", line 167, in post
    context = self.get_context_data(**kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/workflows/views.py", line 91, in get_context_data
    workflow = self.get_workflow()
  File "/usr/lib/python2.7/site-packages/horizon/workflows/views.py", line 81, in get_workflow
    entry_point=entry_point)
  File "/usr/lib/python2.7/site-packages/horizon/workflows/base.py", line 648, in __init__
    valid = step.action.is_valid()
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 184, in is_valid
    return self.is_bound and not self.errors
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 176, in errors
    self.full_clean()
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 393, in full_clean
    self._clean_form()
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 417, in _clean_form
    cleaned_data = self.clean()
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 357, in clean
    self._check_quotas(cleaned_data)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 209, in _check_quotas
    usages = quotas.tenant_quota_usages(self.request)
  File "/usr/lib/python2.7/site-packages/horizon/utils/memoized.py", line 90, in wrapped
    value = cache[key] = func(*args, **kwargs)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/usage/quotas.py", line 361, in tenant_quota_usages
    _get_tenant_volume_usages(request, usages, disabled_quotas, tenant_id)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/usage/quotas.py", line 332, in _get_tenant_volume_usages
    snapshots = cinder.volume_snapshot_list(request, opts)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/cinder.py", line 302, in volume_snapshot_list
    search_opts=search_opts)]
  File "/usr/lib/python2.7/site-packages/cinderclient/v2/volume_snapshots.py", line 131, in list
    "snapshots")
  File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 65, in _list
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 326, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 289, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 272, in request
    raise exceptions.from_response(resp, body)
ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-cb7c6533-65f0-4905-8c72-2f8aef8e5b46)



Version-Release number of selected component:
============================================
python-django-horizon-2015.1.2-3.el7ost.noarch


How reproducible:
================
100%


Steps to Reproduce:
===================
1. Deploy RHOS 7.2 (z3)
2. Connect to Horizon as admin 
3. Create an instance

Actual results:
===============
An error appears 

Danger: There was an error submitting the form. Please try again


Expected results:
=================
instance created successfully

--- Additional comment from Matthias Runge on 2015-12-02 10:13:21 EST ---

Cinder logs are showing:
2015-12-01 10:49:40.238 12951 ERROR cinder.api.middleware.fault [req-48f9277d-0ea8-4af9-b80c-a3e9eacdca6c
 00074bde5412442499a7390d98c824d9 0788735cc9a445ac95611db9dffafebb - - -] Caught error: Entity '<class 'c
inder.db.sqlalchemy.models.Snapshot'>' has no property 'tenant_id'
2015-12-01 10:49:40.239 12951 INFO cinder.api.middleware.fault [req-48f9277d-0ea8-4af9-b80c-a3e9eacdca6c 00074bde5412442499a7390d98c824d9 0788735cc9a445ac95611db9dffafebb - - -] http://cougar11.scl.lab.tlv.redhat.com:8776/v2/0788735cc9a445ac95611db9dffafebb/snapshots/detail?alltenants=1&tenant_id=0788735cc9a445ac95611db9dffafebb returned with HTTP 500
2015-12-01 10:49:40.240 12951 INFO eventlet.wsgi.server [req-48f9277d-0ea8-4af9-b80c-a3e9eacdca6c 00074bde5412442499a7390d98c824d9 0788735cc9a445ac95611db9dffafebb - - -] 10.35.160.111 - - [01/Dec/2015 10:49:40] "GET /v2/0788735cc9a445ac95611db9dffafebb/snapshots/detail?alltenants=1&tenant_id=0788735cc9a445ac95611db9dffafebb HTTP/1.1" 500 425 0.007403


Which makes me think, this is a cinder issue.

--- Additional comment from Gorka Eguileor on 2015-12-04 04:06:06 EST ---

Root of the problem is an horizon bug (even though Cinder should not return 500): https://bugs.launchpad.net/horizon/+bug/1469589

And it gets fixed in here: https://github.com/openstack/horizon/commit/faa44bfe1d6c4f342b8572bc4939771cda2039c7

As for Cinder, it should not return 500, so we need to we need to add filter validation (https://github.com/openstack/cinder/commit/8ba66fc5d2672bff69c21e36918e5e1882167649).  Some of the validations introduced in this patch are already in place, though some are missing on 7.0.

We need Horizon fix as well as the Cinder fix, because with only the Cinder fix Horizon will receive an empty list due to the malformed request.


--- Additional comment from Matthias Runge on 2015-12-04 08:35:02 EST ---

Horizon backport is here https://review.openstack.org/253496

Comment 1 Matthias Runge 2015-12-07 07:20:38 UTC
*** Bug 1287770 has been marked as a duplicate of this bug. ***

Comment 3 Matthias Runge 2015-12-07 11:04:36 UTC
There are actually two patches required, on in cinder, one for horizon.

How to test:
Launch an instance in horizon

It should work.

Comment 8 Ido Ovadia 2015-12-10 13:41:24 UTC
verified
========
python-django-horizon-2015.1.2-4.el7ost.noarch

Comment 10 errata-xmlrpc 2015-12-21 17:05:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:2675


Note You need to log in before you can comment on or make changes to this bug.