Snapshot volume backed VM does not handle image metadata correctly

Bug #1384392 reported by Samuel Matzek
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Feodor Tersin

Bug Description

Nova Juno

The instance snapshot of volume backed instances does not handle image metadata the same way that the regular instance snapshot path does.

nova/compute/api/api.py's snapshot path builds the Glance image metadata using nova/compute/utils.py get_image_metadata which gets metadata from the VM's base image, includes metadata from the instance's system metadata, and excludes properties specified in CONF.non_inheritable_image_properties.

The volume backed snapshot path, http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1472 simply gets the image properties from the base image and does not include properties from instance system metadata and doesn't honor the CONF.non_inheritable_image_properties property.

Tracy Jones (tjones-i)
tags: added: compute volumes
Alex Xu (xuhj)
Changed in nova:
assignee: nobody → Alex Xu (xuhj)
melanie witt (melwitt)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Alex Xu (xuhj) wrote :
Changed in nova:
assignee: Alex Xu (xuhj) → nobody
Changed in nova:
assignee: nobody → Feodor Tersin (ftersin)
status: Confirmed → In Progress
Changed in nova:
assignee: Feodor Tersin (ftersin) → Michael Still (mikalstill)
Changed in nova:
assignee: Michael Still (mikalstill) → Feodor Tersin (ftersin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/198959
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6b93494bfda1385244fed3bbadbe2a26b38f9a09
Submitter: Jenkins
Branch: master

commit 6b93494bfda1385244fed3bbadbe2a26b38f9a09
Author: Feodor Tersin <email address hidden>
Date: Tue Jul 7 07:33:34 2015 +0300

    Consolidate initialization of instance snapshot metadata

    Both types of instance snapshots (volume-backed and image-based) require
    similar metadata with a few differences. This patch introduces a common
    method for initialization of instance snapshot metadata and uses it in
    the custom cases.

    Also this fixes a bug for volume-backed instance snapshots: properties
    restricted to be inherited by config are inherited though.

    Closes-Bug: #1384392
    Change-Id: I811405bbe98e391f76b868cd35b03ca3dced8cdd

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-3 → 12.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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