fix _get_bdm_image_metadata and semantics

Bug #1220814 reported by Christopher Lefelhocz
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unassigned

Bug Description

There are two issues to potentially address:

1) _get_bdm_image_metadata currently returns a subset of metadata depending on which block device mapping is being examined. For instance if the block is an image then return the properties metadata. if the bdm is a volume, then we return the volume_image_metadata. These should either be refactored out or the name should change somehow.
2) The semantics are different between two types. An image will return an empty dictionary if no properties exist (which makes sense because customers could have not metadata defined). The volume will fail with an exception if no volume_image_metadata exists. This should be addressed in some fashion.

Tags: volumes
Changed in nova:
importance: Undecided → Low
tags: added: volumes
Changed in nova:
assignee: nobody → Xavier Queralt (xqueralt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/46221

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/46221
Committed: http://github.com/openstack/nova/commit/1b1921f5f0cb4c5cb565af222b4c2d6a6531a717
Submitter: Jenkins
Branch: master

commit 1b1921f5f0cb4c5cb565af222b4c2d6a6531a717
Author: Xavier Queralt <email address hidden>
Date: Thu Sep 12 10:57:43 2013 +0200

    Don't fail if volume has no image metadata

    In the same way that nova shouldn't fail when booting an instance if the
    image has no metadata, when booting from a volume it should accept the
    fact that it has no image_metadata and return an empty dict.

    Fixes bug #1220814

    Change-Id: Idc0ff2106415a0662e57021e918dc5c6bf9a9a92

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → havana-rc1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-rc1 → 2013.2
Revision history for this message
PraveenKumar (praveenkumar-2608) wrote :

I am facing the same issue with Icehouse. Could you please give me detail procedure on how to apply this fix

Revision history for this message
PraveenKumar (praveenkumar-2608) wrote :

I am facing the same issue with Icehouse. Could you please give me detail procedure on how to apply this fix

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.