← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Reviewed:  https://review.opendev.org/c/openstack/horizon/+/861919
Committed: https://opendev.org/openstack/horizon/commit/01afd1ba70c207932a6574c9ab13036d40abe3fe
Submitter: "Zuul (22348)"
Branch:    master

commit 01afd1ba70c207932a6574c9ab13036d40abe3fe
Author: Victor Coutellier <victor.coutellier@xxxxxxxxx>
Date:   Wed Oct 19 21:17:07 2022 +0200

    Handle empty image_type in launch-instance workflow
    
    Fix the getImageType function to handle edge case
    when image_type attribute is present but is an
    empty string.
    
    Closes-Bug: 1993579
    Change-Id: Ie08cf1010d64ff927515b4792e9b052a76b6344d


** Changed in: horizon
       Status: In Progress => Fix Released

-- 
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):
  Fix Released

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



References