KeyError: 'used' security_group_rule quota missing 'used' key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Won't Fix
|
Undecided
|
Unassigned | ||
OpenStack Neutron API Charm |
Fix Released
|
High
|
Corey Bryant |
Bug Description
On rocky rc1, after attempting to log in to the dashboard I hit:
Internal Server Error: /horizon/project/
Traceback (most recent call last):
File "/usr/lib/
response = get_response(
...
File "/usr/lib/
used = self.usage.
KeyError: 'used'
Full traceback: https:/
From openstack_
def _process_
charts = []
for t in chart_defs:
if t.quota_key not in self.usage.limits:
key = t.quota_key
used = self.usage.
quota = self.usage.
Further debugging shows we're failing on key='security_
chart_def=
self.usage.
Notice there's no 'used' key in self.usage.limits. Compare that vs 'security_group' which has:
chart_def=
self.usage.
From openstack_
def tally(self, name, value):
"""Adds to the "used" metric for the given quota."""
value = value or 0 # Protection against None.
# Start at 0 if this is the first value.
if 'used' not in self.usages[name]:
I haven't confirmed but it seems that tally does the initialization of the 'used' key and for some reason that's not happening.
description: | updated |
Changed in charm-neutron-api: | |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | nobody → Corey Bryant (corey.bryant) |
Changed in charm-neutron-api: | |
milestone: | none → 18.08 |
Changed in charm-neutron-api: | |
status: | Fix Committed → Fix Released |
This jumped out at me from _get_tenant_ network_ usages_ legacy( ) in openstack_ dashboard/ usage/quotas. py:
# TODO(amotoki): Add security_ group_rule?
So I checked and in _get_tenant_ network_ usages( ) the following check evaluates to False, causing _get_tenant_ network_ usages_ legacy( ) to be called:
if neutron. is_extension_ supported( request, 'quota_details'):