Horizon crashed when parsing volume list including a volume without name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Undecided
|
Trung Trinh | ||
Juno |
Fix Released
|
Low
|
Kieran Spear |
Bug Description
This bug can be re-produced as follows:
- 1. Use Nova or Cinder CLI to create a volume without name that can be used to boot a new VM:
nova boot some_name --flavor 1 --image some_img_id --nic net-id=some_nic_id --block-device source=
Note that: in the "--block-device", we don't specify volume name
cinder create 1 --image-id some_img_id
Note that: we don't specify name for the volume to be created
- 2. After that, if we try to retrieve the volume list by clicking the tab "Volumes" on Horizon, then Horizon will always be crashed. Note that, the crash does not occur when using CLI "cinder list" to list all available volumes.
Traceback:
[Tue Nov 04 06:36:51.620653 2014] [:error] [pid 12412:tid 140421861299968] Error while rendering table rows.
[Tue Nov 04 06:36:51.620733 2014] [:error] [pid 12412:tid 140421861299968] Traceback (most recent call last):
[Tue Nov 04 06:36:51.620776 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.620817 2014] [:error] [pid 12412:tid 140421861299968] row = self._meta.
[Tue Nov 04 06:36:51.620871 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.620911 2014] [:error] [pid 12412:tid 140421861299968] self.load_cells()
[Tue Nov 04 06:36:51.620975 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.621040 2014] [:error] [pid 12412:tid 140421861299968] cell = table._
[Tue Nov 04 06:36:51.621078 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.621118 2014] [:error] [pid 12412:tid 140421861299968] self.data = self.get_
[Tue Nov 04 06:36:51.621159 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.621200 2014] [:error] [pid 12412:tid 140421861299968] data = column.
[Tue Nov 04 06:36:51.621238 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.621331 2014] [:error] [pid 12412:tid 140421861299968] data = self.get_
[Tue Nov 04 06:36:51.621373 2014] [:error] [pid 12412:tid 140421861299968] File "/opt/stack_
[Tue Nov 04 06:36:51.621414 2014] [:error] [pid 12412:tid 140421861299968] "dev": html.escape(
[Tue Nov 04 06:36:51.621473 2014] [:error] [pid 12412:tid 140421861299968] KeyError: 'device'
Root cause: from the above Traceback, it's easy to see that the crash root cause is because Horizon tries to get the value of a non-existing key.
Proposal for fixing this bug: secure the accessing the key "device" as follows:
"dev": html.escape(
Changed in horizon: | |
assignee: | nobody → Trung Trinh (trung-t-trinh) |
description: | updated |
Changed in horizon: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | kilo-1 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/132644
Review: https:/