← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1993579] [NEW] launch-instance workflow crash if image_type is empty

 

Public bug reported:

Launch instance workflow crash during the load of the images through
glance if there is an image with an empty string as image_type.

Following this code :
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-
instance/launch-instance-model.service.js#L678, the check
"angular.isDefined(image.properties.image_type)" will return true if the
image_type is an empty string, but the next line "return
image.properties.image_type || ..." will return false, which can lead to
access to undefined variable and raise a javascript error.

Impact is the impossibility to launch a VM from an image or a snapshot
in case of an empty image_type in the image list.

Solution is to better handle and test this edge case.

** Affects: horizon
     Importance: Undecided
     Assignee: Victor Coutellier (alistarle)
         Status: In Progress

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

Title:
  launch-instance workflow crash if image_type is empty

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  Launch instance workflow crash during the load of the images through
  glance if there is an image with an empty string as image_type.

  Following this code :
  https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-
  instance/launch-instance-model.service.js#L678, the check
  "angular.isDefined(image.properties.image_type)" will return true if
  the image_type is an empty string, but the next line "return
  image.properties.image_type || ..." will return false, which can lead
  to access to undefined variable and raise a javascript error.

  Impact is the impossibility to launch a VM from an image or a snapshot
  in case of an empty image_type in the image list.

  Solution is to better handle and test this edge case.

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



Follow ups