[Bug 1834747] Re: Horizon is unable to show instance list is image_id is not set
Alvaro Uria
1834747 at bugs.launchpad.net
Thu Aug 8 07:24:24 UTC 2019
Per bug 1826690, this fix has actually been released in 15.1.0 (not
15.0.1).
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1834747
Title:
Horizon is unable to show instance list is image_id is not set
Status in Ubuntu Cloud Archive:
New
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/cloud-archive/+bug/1834747/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list