← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1268573] [NEW] Incorrect quota value in database leads to dashboard crash

 

Public bug reported:

We have an incorrect value in project quota because of this bug:
https://bugs.launchpad.net/nova/+bug/1268569

mysql> select resource,in_use from quota_usages;
+-----------------+--------+
| resource | in_use |
+-----------------+--------+
| security_groups | 0 |
| instances | 0 |
| ram | 0 |
| cores | 0 |
| fixed_ips | 0 |
| floating_ips | -1 |
+-----------------+--------+
6 rows in set (0.00 sec)

This cause total crash of dashboard/project page with 500 error. And for
some reason dashboard thinks that -1 means "Inf". It fails to display
diagrams of quota.


Debug info:
Environment:

Request Method: GET
Request URL: http://172.16.0.6/dashboard/project/

Django Version: 1.4.8
Python Version: 2.6.6
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')
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')

Template error:
In template /usr/lib/python2.6/site-packages/horizon/templates/horizon/common/_limit_summary.html, error at line 27
   cannot convert float infinity to integer
   17 : </div>

   18 :

   19 : <div class="d3_quota_bar">

   20 : <div class="d3_pie_chart" data-used="{% widthratio
usage.limits.totalRAMUsed usage.limits.maxTotalRAMSize 100 %}"></div>

   21 : <strong>{% trans "RAM" %} <br />

   22 : {% blocktrans with
used=usage.limits.totalRAMUsed|mb_float_format
available=usage.limits.maxTotalRAMSize|mb_float_format %}Used <span> {{
used }} </span> of <span> {{ available }} </span>{% endblocktrans %}

   23 : </strong>

   24 : </div>

   25 :

   26 : <div class="d3_quota_bar">

   27 : <div class="d3_pie_chart" data-used=" {% widthratio
usage.limits.totalFloatingIpsUsed usage.limits.maxTotalFloatingIps 100
%} "></div>

   28 : <strong>{% trans "Floating IPs" %} <br />

   29 : {% blocktrans with
used=usage.limits.totalFloatingIpsUsed|intcomma
available=usage.limits.maxTotalFloatingIps|intcomma %}Used <span> {{
used }} </span> of <span> {{ available }} </span>{% endblocktrans %}

   30 : </strong>

   31 : </div>

   32 :

   33 : <div class="d3_quota_bar">

   34 : <div class="d3_pie_chart" data-used="{% widthratio
usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups 100
%}"></div>

   35 : <strong>{% trans "Security Groups" %} <br />

   36 : {% blocktrans with
used=usage.limits.totalSecurityGroupsUsed|intcomma
available=usage.limits.maxSecurityGroups|intcomma%}Used <span> {{ used
}} </span> of <span> {{ available }} </span>{% endblocktrans %}

   37 : </strong>

Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  136. response = response.render()
File "/usr/lib/python2.6/site-packages/django/template/response.py" in render
  104. self._set_content(self.rendered_content)
File "/usr/lib/python2.6/site-packages/django/template/response.py" in rendered_content
  81. content = template.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  140. return self._render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
  134. return self.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  823. bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
  74. return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  123. return compiled_parent._render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
  134. return self.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  823. bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
  74. return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  62. result = block.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  823. bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
  74. return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  62. result = block.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  823. bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
  74. return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
  155. return self.render_template(self.template, context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render_template
  137. output = template.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  140. return self._render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
  134. return self.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
  823. bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
  74. return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py" in render
  460. return str(int(round(ratio)))

Exception Type: OverflowError at /project/
Exception Value: cannot convert float infinity to integer

** Affects: horizon
     Importance: Undecided
         Status: New

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

Title:
  Incorrect quota value in database leads to dashboard crash

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  We have an incorrect value in project quota because of this bug:
  https://bugs.launchpad.net/nova/+bug/1268569

  mysql> select resource,in_use from quota_usages;
  +-----------------+--------+
  | resource | in_use |
  +-----------------+--------+
  | security_groups | 0 |
  | instances | 0 |
  | ram | 0 |
  | cores | 0 |
  | fixed_ips | 0 |
  | floating_ips | -1 |
  +-----------------+--------+
  6 rows in set (0.00 sec)

  This cause total crash of dashboard/project page with 500 error. And
  for some reason dashboard thinks that -1 means "Inf". It fails to
  display diagrams of quota.

  
  Debug info:
  Environment:

  Request Method: GET
  Request URL: http://172.16.0.6/dashboard/project/

  Django Version: 1.4.8
  Python Version: 2.6.6
  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')
  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')

  Template error:
  In template /usr/lib/python2.6/site-packages/horizon/templates/horizon/common/_limit_summary.html, error at line 27
     cannot convert float infinity to integer
     17 : </div>

     18 :

     19 : <div class="d3_quota_bar">

     20 : <div class="d3_pie_chart" data-used="{% widthratio
  usage.limits.totalRAMUsed usage.limits.maxTotalRAMSize 100 %}"></div>

     21 : <strong>{% trans "RAM" %} <br />

     22 : {% blocktrans with
  used=usage.limits.totalRAMUsed|mb_float_format
  available=usage.limits.maxTotalRAMSize|mb_float_format %}Used <span>
  {{ used }} </span> of <span> {{ available }} </span>{% endblocktrans
  %}

     23 : </strong>

     24 : </div>

     25 :

     26 : <div class="d3_quota_bar">

     27 : <div class="d3_pie_chart" data-used=" {% widthratio
  usage.limits.totalFloatingIpsUsed usage.limits.maxTotalFloatingIps 100
  %} "></div>

     28 : <strong>{% trans "Floating IPs" %} <br />

     29 : {% blocktrans with
  used=usage.limits.totalFloatingIpsUsed|intcomma
  available=usage.limits.maxTotalFloatingIps|intcomma %}Used <span> {{
  used }} </span> of <span> {{ available }} </span>{% endblocktrans %}

     30 : </strong>

     31 : </div>

     32 :

     33 : <div class="d3_quota_bar">

     34 : <div class="d3_pie_chart" data-used="{% widthratio
  usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups
  100 %}"></div>

     35 : <strong>{% trans "Security Groups" %} <br />

     36 : {% blocktrans with
  used=usage.limits.totalSecurityGroupsUsed|intcomma
  available=usage.limits.maxSecurityGroups|intcomma%}Used <span> {{ used
  }} </span> of <span> {{ available }} </span>{% endblocktrans %}

     37 : </strong>

  Traceback:
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
    136. response = response.render()
  File "/usr/lib/python2.6/site-packages/django/template/response.py" in render
    104. self._set_content(self.rendered_content)
  File "/usr/lib/python2.6/site-packages/django/template/response.py" in rendered_content
    81. content = template.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    140. return self._render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
    134. return self.nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    823. bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
    74. return node.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
    123. return compiled_parent._render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
    134. return self.nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    823. bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
    74. return node.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
    62. result = block.nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    823. bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
    74. return node.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
    62. result = block.nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    823. bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
    74. return node.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render
    155. return self.render_template(self.template, context)
  File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py" in render_template
    137. output = template.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    140. return self._render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in _render
    134. return self.nodelist.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/base.py" in render
    823. bit = self.render_node(node, context)
  File "/usr/lib/python2.6/site-packages/django/template/debug.py" in render_node
    74. return node.render(context)
  File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py" in render
    460. return str(int(round(ratio)))

  Exception Type: OverflowError at /project/
  Exception Value: cannot convert float infinity to integer

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


Follow ups

References