← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1387530] [NEW] Resource usage stats shows error when "--" is selected ad grouping parameter

 

Public bug reported:

When selecting '--' as grouping parameter, Resource usage  stats
displays error message as "Internal server error"

Log shows the following error:

[Thu Oct 30 06:42:17 2014] [error] Internal Server Error: /admin/metering/samples
[Thu Oct 30 06:42:17 2014] [error] Traceback (most recent call last):
[Thu Oct 30 06:42:17 2014] [error]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
[Thu Oct 30 06:42:17 2014] [error]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 36, in dec
[Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 84, in dec
[Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 52, in dec
[Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 36, in dec
[Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 84, in dec
[Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
[Thu Oct 30 06:42:17 2014] [error]     return self.dispatch(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
[Thu Oct 30 06:42:17 2014] [error]     return handler(request, *args, **kwargs)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/metering/views.py", line 97, in get
[Thu Oct 30 06:42:17 2014] [error]     resources, unit = query.query(meter_name)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/utils/metering.py", line 150, in query
[Thu Oct 30 06:42:17 2014] [error]     filter_func=filter_by_meter_name)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/ceilometer.py", line 653, in resources_with_statistics
[Thu Oct 30 06:42:17 2014] [error]     with_users_and_tenants=with_users_and_tenants)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/ceilometer.py", line 617, in resources
[Thu Oct 30 06:42:17 2014] [error]     query=query, ceilometer_usage_object=ceilometer_usage_object)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/ceilometer.py", line 290, in resource_list
[Thu Oct 30 06:42:17 2014] [error]     resources.list(q=query)
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/resources.py", line 35, in list
[Thu Oct 30 06:42:17 2014] [error]     return self._list(options.build_url(path, q))
[Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/options.py", line 52, in build_url
[Thu Oct 30 06:42:17 2014] [error]     query_params['q.%s' % name].append(query.get(name, ''))
[Thu Oct 30 06:42:17 2014] [error] AttributeError: 'unicode' object has no attribute 'get'

** Affects: horizon
     Importance: Undecided
     Assignee: Pradeep Kumar (pradeep-av)
         Status: New

** Attachment added: "Error message"
   https://bugs.launchpad.net/bugs/1387530/+attachment/4248953/+files/bug.PNG

** Changed in: horizon
     Assignee: (unassigned) => Pradeep Kumar (pradeep-av)

** Summary changed:

- Resource usage stats shows error when "--" is selected
+ Resource usage stats shows error when "--" is selected ad grouping parameter

-- 
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/1387530

Title:
  Resource usage stats shows error when "--" is selected ad grouping
  parameter

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  When selecting '--' as grouping parameter, Resource usage  stats
  displays error message as "Internal server error"

  Log shows the following error:

  [Thu Oct 30 06:42:17 2014] [error] Internal Server Error: /admin/metering/samples
  [Thu Oct 30 06:42:17 2014] [error] Traceback (most recent call last):
  [Thu Oct 30 06:42:17 2014] [error]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
  [Thu Oct 30 06:42:17 2014] [error]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 36, in dec
  [Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 84, in dec
  [Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 52, in dec
  [Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 36, in dec
  [Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 84, in dec
  [Thu Oct 30 06:42:17 2014] [error]     return view_func(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
  [Thu Oct 30 06:42:17 2014] [error]     return self.dispatch(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
  [Thu Oct 30 06:42:17 2014] [error]     return handler(request, *args, **kwargs)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/metering/views.py", line 97, in get
  [Thu Oct 30 06:42:17 2014] [error]     resources, unit = query.query(meter_name)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/utils/metering.py", line 150, in query
  [Thu Oct 30 06:42:17 2014] [error]     filter_func=filter_by_meter_name)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/ceilometer.py", line 653, in resources_with_statistics
  [Thu Oct 30 06:42:17 2014] [error]     with_users_and_tenants=with_users_and_tenants)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/ceilometer.py", line 617, in resources
  [Thu Oct 30 06:42:17 2014] [error]     query=query, ceilometer_usage_object=ceilometer_usage_object)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/ceilometer.py", line 290, in resource_list
  [Thu Oct 30 06:42:17 2014] [error]     resources.list(q=query)
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/resources.py", line 35, in list
  [Thu Oct 30 06:42:17 2014] [error]     return self._list(options.build_url(path, q))
  [Thu Oct 30 06:42:17 2014] [error]   File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/options.py", line 52, in build_url
  [Thu Oct 30 06:42:17 2014] [error]     query_params['q.%s' % name].append(query.get(name, ''))
  [Thu Oct 30 06:42:17 2014] [error] AttributeError: 'unicode' object has no attribute 'get'

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


Follow ups

References