Incomplete metadata is return for an instance when booting from volume instead of image

Bug #1175571 reported by Matthew Macdonald-Wallace
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Matthew Macdonald-Wallace (HPCS)

Bug Description

When booting from a cinder volume, metadata that would normally be included as part of a "standard" glance install/boot is not included in the volume metadata.

When booting from a volume, the volume metadata should be returned by Cinder in the same way that the image metadata is returned by Glance when booting from an image.

Changed in nova:
assignee: nobody → Matthew Macdonald-Wallace (proffalken)
Revision history for this message
Matthew Macdonald-Wallace (proffalken) wrote :

nova/compute/api.py:

 528 if image_href:
 529 (image_service, image_id) = glance.get_remote_image_service(
 530 context, image_href)
 531 image = image_service.show(context, image_id)
 532 if image['status'] != 'active':
 533 raise exception.ImageNotActive(image_id=image_id)
 534 else:
 535 image = {}

This probably should talk to glance if we don't have an image_href to get the metadata from there?

Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → Low
description: updated
Revision history for this message
Matthew Macdonald-Wallace (proffalken) wrote :

https://review.openstack.org/#/c/27898 appears to cover much of this, will work on integrating and testing that code now.

Revision history for this message
Matthew Macdonald-Wallace (proffalken) wrote :

I was looking in the wrong place above, fix enroute now.

Changed in nova:
assignee: Matthew Macdonald-Wallace (proffalken) → Matthew Macdonald-Wallace (HPCS) (matthew-macdonald-wallace)
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/28969

Changed in nova:
status: Triaged → In Progress
Changed in nova:
assignee: Matthew Macdonald-Wallace (HPCS) (matthew-macdonald-wallace) → Stanislaw Pitucha (stanislaw-pitucha)
Revision history for this message
Loganathan Parthipan (parthipan) wrote :

It'll be nice to get this long overdue fix merged. :)

Changed in nova:
assignee: Stanislaw Pitucha (stanislaw-pitucha) → Matthew Macdonald-Wallace (HPCS) (matthew-macdonald-wallace)
Changed in nova:
assignee: Matthew Macdonald-Wallace (HPCS) (matthew-macdonald-wallace) → Stanislaw Pitucha (stanislaw-pitucha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/28969
Committed: http://github.com/openstack/nova/commit/e67641da51610a419ec8cf6562583d14a2b0fbd7
Submitter: Jenkins
Branch: master

commit e67641da51610a419ec8cf6562583d14a2b0fbd7
Author: Matthew Macdonald-Wallace <email address hidden>
Date: Fri Jun 7 15:20:00 2013 +0100

    Export volume metadata to new instances.

    Instances that are booted from volume currently miss out on glance
    metadata that instances booted from images receive. By extracting
    that data and passing it on in the create request we make it
    available to both sorts of instance boot, fixing bug 1175571.

    Change-Id: I8c01ba3065a909ca8e1805db9a10a423b10fe289

Changed in nova:
status: In Progress → Fix Committed
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/33296

Revision history for this message
Matthew Macdonald-Wallace (HPCS) (matthew-macdonald-wallace) wrote :

The original patch retrieved the correct metadata from Cinder, however it did not apply it to the Nova instance.

This latest patch set ensures that any metadata added to a Glance image is transferred to the instance even if it is booted from a volume.

Changed in nova:
assignee: Stanislaw Pitucha (stanislaw-pitucha) → Matthew Macdonald-Wallace (HPCS) (matthew-macdonald-wallace)
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-2 → 2013.2
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.