** Also affects: horizon/juno
   Importance: Undecided
       Status: New

** Changed in: horizon/juno
   Importance: Undecided => Low

** Changed in: horizon/juno
       Status: New => In Progress

** Changed in: horizon/juno
     Assignee: (unassigned) => Kieran Spear (kspear)

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

Title:
  Horizon crashed when parsing volume list including a volume without
  name

Status in OpenStack Dashboard (Horizon):
  Fix Released
Status in OpenStack Dashboard (Horizon) juno series:
  In Progress

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=image,id=some_img_id,dest=volume,size=1,bootindex=1"

         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_stable_juno/horizon/openstack_dashboard/wsgi/../../horizon/tables/base.py",
  line 1731, in get_rows

  [Tue Nov 04 06:36:51.620817 2014] [:error] [pid 12412:tid
  140421861299968]     row = self._meta.row_class(self, datum)

  [Tue Nov 04 06:36:51.620871 2014] [:error] [pid 12412:tid
  140421861299968]   File
  
"/opt/stack_stable_juno/horizon/openstack_dashboard/wsgi/../../horizon/tables/base.py",
  line 522, in __init__

  [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_stable_juno/horizon/openstack_dashboard/wsgi/../../horizon/tables/base.py",
  line 548, in load_cells

  [Tue Nov 04 06:36:51.621040 2014] [:error] [pid 12412:tid
  140421861299968]     cell = table._meta.cell_class(datum, column,
  self)

  [Tue Nov 04 06:36:51.621078 2014] [:error] [pid 12412:tid
  140421861299968]   File
  
"/opt/stack_stable_juno/horizon/openstack_dashboard/wsgi/../../horizon/tables/base.py",
  line 644, in __init__

  [Tue Nov 04 06:36:51.621118 2014] [:error] [pid 12412:tid
  140421861299968]     self.data = self.get_data(datum, column, row)

  [Tue Nov 04 06:36:51.621159 2014] [:error] [pid 12412:tid
  140421861299968]   File
  
"/opt/stack_stable_juno/horizon/openstack_dashboard/wsgi/../../horizon/tables/base.py",
  line 682, in get_data

  [Tue Nov 04 06:36:51.621200 2014] [:error] [pid 12412:tid
  140421861299968]     data = column.get_data(datum)

  [Tue Nov 04 06:36:51.621238 2014] [:error] [pid 12412:tid
  140421861299968]   File
  
"/opt/stack_stable_juno/horizon/openstack_dashboard/wsgi/../../horizon/tables/base.py",
  line 375, in get_data

  [Tue Nov 04 06:36:51.621331 2014] [:error] [pid 12412:tid
  140421861299968]     data = self.get_raw_data(datum)

  [Tue Nov 04 06:36:51.621373 2014] [:error] [pid 12412:tid
  140421861299968]   File
  
"/opt/stack_stable_juno/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/volumes/volumes/tables.py",
  line 298, in get_raw_data

  [Tue Nov 04 06:36:51.621414 2014] [:error] [pid 12412:tid
  140421861299968]     "dev": html.escape(attachment["device"])}

  [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(attachment.get("device", ""))}

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to