security_group_rule is not correctly processed with legacy neutron

Bug #1838952 reported by Yang Youseok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Expired
Undecided
Unassigned

Bug Description

If neutron does not support quota_details, currently horizon is broken emitting KeyError below.

[Mon Aug 05 18:14:59.218082 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] File "/var/lib/kolla/venv/lib/python3.6/site-packages/horizon/tables/views.py", line 226, in get
[Mon Aug 05 18:14:59.218086 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] context = self.get_context_data(**kwargs)
[Mon Aug 05 18:14:59.218090 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] File "/var/lib/kolla/venv/lib/python3.6/site-packages/openstack_dashboard/usage/views.py", line 201, in get_context_data
[Mon Aug 05 18:14:59.218097 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] context['charts'] = self._get_charts_data()
[Mon Aug 05 18:14:59.218101 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] File "/var/lib/kolla/venv/lib/python3.6/site-packages/openstack_dashboard/usage/views.py", line 154, in _get_charts_data
[Mon Aug 05 18:14:59.218105 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] chart_data = self._process_chart_section(section['charts'])
[Mon Aug 05 18:14:59.218109 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] File "/var/lib/kolla/venv/lib/python3.6/site-packages/openstack_dashboard/usage/views.py", line 170, in _process_chart_section
[Mon Aug 05 18:14:59.218113 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] used = self.usage.limits[key]['used']
[Mon Aug 05 18:14:59.218119 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513] KeyError: 'used'
[Mon Aug 05 18:14:59.218127 2019] [wsgi:error] [pid 34:tid 140353969415936] [remote 172.26.100.219:53513]

It's due to the function _get_neutron_quota_data() in that the function add the key 'security_group_rules' but _get_tenant_network_usages_legacy() does not 'tally' the key 'security_group_rules'.

usages['security_group_rules'] now only have 'quota' key without 'used'.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

neutron quotasv2_detail extension is available since Pike and it is agnostic to plugin, so I assume neutron quotasv2_detail extension is always available. When does this problem happens?

Changed in horizon:
status: New → Incomplete
Revision history for this message
Akihiro Motoki (amotoki) wrote :

correction: I mean "quota_details" extension in neutron. I just used a filename of the corresponding neutron extension.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Dashboard (Horizon) because there has been no activity for 60 days.]

Changed in horizon:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.