Reviewed: https://review.opendev.org/668595 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=42f4ef334d89a492103fdea2df982e108d5713ea Submitter: Zuul Branch: master
commit 42f4ef334d89a492103fdea2df982e108d5713ea Author: Akihiro Motoki <[email protected]> Date: Tue Jul 2 14:05:19 2019 +0900 Do not always assume image_id in volume_image_metadata volume_image_metadata can contain only fields other than image_id. We should not assume volume_image_metadata always contain image_id when volume_image_metadata exists. Change-Id: I0db8a05e488eb6bf276760d5116d05633c882701 Closes-Bug: #1834747 ** 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/1834747 Title: Horizon is unable to show instance list is image_id is not set Status in OpenStack Dashboard (Horizon): Fix Released Bug description: My setup contains several instance made from empty volume and installation from iso image. Thus, those instances does not have any source image. But some instances still have have image_metadata to tweak instances . As an example, those are the metadata from one of my boot volume : volume_image_metadata | {u'hw_qemu_guest_agent': u'yes', u'hw_vif_multiqueue_enabled': u'true', u'os_require_quiesce': u'yes'} Before Stein, I was able to go to project/instance and list every instances from the project, as expected. Since Stein Horizon release, this page crash without much details. After further investigation, I foud that the culprit is that piece of code in /usr/horizon/openstack_dashboard/dashboards/project/instances/views.py from line 184 boot_volume = volume_dict[instance_volumes[0]['id']] if (hasattr(boot_volume, "volume_image_metadata") and boot_volume.volume_image_metadata['image_id'] in image_dict): instance.image = image_dict[ boot_volume.volume_image_metadata['image_id'] ] I replace this code by that one to take care of the case where there are image metadata but no image_id: boot_volume = volume_dict[instance_volumes[0]['id']] if (hasattr(boot_volume, "volume_image_metadata")): if (hasattr(boot_volume.volume_image_metadata, "image_id")): if (boot_volume.volume_image_metadata['image_id'] in image_dict): instance.image = image_dict[ boot_volume.volume_image_metadata['image_id'] ] That corrected this specific bug but I might not be the only one impacted by it... To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1834747/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

