← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1834747] [NEW] Horizon is unable to show instance list is image_id is not set

 

Public bug reported:

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...

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
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):
  New

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


Follow ups