Hi, looks like you are not using the horizon master branch. This bug is
already fixed by
https://review.opendev.org/c/openstack/horizon/+/777654.

Feel free to backport it if you are using an old branch.

** Changed in: horizon
       Status: New => 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/1930551

Title:
  Instance image assumes that volume's image metadata exists

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  When I access an instance through /project/instance/${(ID), the
  dashboard always show an error notification with message: Failed to
  get attached volume.

  The instance is working fine and the volume can be verified through openstack 
cli. 
  A quick grep for the error message shows the below code path in which, the 
instance.image processing in the Try path makes an assumption that volume 
metadata always exists. This is not the case when the volume was created with 
"no source, empty source" as Volume Source.

  Also there is no logging code in this code path, so although we see
  the error in dashboard, we don't find any log message that can
  indicate the issue.

  
  class OverviewTab(tabs.Tab):
      name = _("Overview")
      slug = "overview"
      template_name = ("project/instances/"
                       "_detail_overview.html")

      def get_context_data(self, request):
          instance = self.tab_group.kwargs['instance']
          if instance.volumes and not instance.image:
              try:
                  volume = api.cinder.volume_get(
                      self.request, volume_id=instance.volumes[0].volumeId)
                  instance.image = {
                      'id': volume.volume_image_metadata['image_id'],
                      'name': volume.volume_image_metadata['image_name']}
              except Exception:
                  exceptions.handle(self.request,
                                    _('Failed to get attached volume.'))
          return {"instance": instance}

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to