yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #34412
[Bug 1459760] Re: Incorrect dropping of image meta properties not wanted for snapshotting
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => liberty-1
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1459760
Title:
Incorrect dropping of image meta properties not wanted for
snapshotting
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
Back in July 20, there was a 'non_inheritable_image_properties' flag
added which filtered out a couple of image metadata properties when
the XenAPI driver uploaded images to glance.
commit ae7adbb92babf2dfc928daa76474aaba8e325d9c
Author: Rick Harris <rconradharris@xxxxxxxxx>
Date: Fri Jul 20 22:35:10 2012 +0000
Adds non_inheritable_image_properties flag.
Some image-properties should not be inherited from the instance when
taking a snapshot because we want that functionality to only available
for the base-image, not subsequent snapshots.
As an example, we would like 'cache_in_nova' fast-cloning to be
available just for base-images and not customer snapshots created off a
base-image.
This patch adds a new configuration which allows operators to, at
runtime, select which image-properties should not be inherited by newly
created snapshots.
Change-Id: I8d7781b05ffd71a59ba69fb7c3df4616cba94cce
Although these properties were only really relevant to XenAPI, the
logic was then moved into the compute manager api code for creating
snapshots
commit 1c68e733ca0e536ea95ac982d1b4b43ed143b3e2
Author: Kevin L. Mitchell <kevin.mitchell@xxxxxxxxxxxxx>
Date: Thu Oct 4 16:23:14 2012 -0500
Move snapshot image property inheritance
The xenapi snapshotting code had support for inheriting properties
from the base image of the snapshot (by way of the system metadata
set on the snapshotted instance). The problem, however, came in the
fact that some image properties were set in nova.compute.api, but
those properties were not excluded from this inheritance logic
except through a configuration option called
"non_inheritable_image_properties". I had previously updated the
default setting for this option to work around the bugs introduced
by setting image properties in two different locations, but now it
is time for the real fix.
This change moves the inheritance logic into
nova.compute.api:API._create_image. Note that two properties are
still set through the xenapi snapshotting logic: the "os_type" and
the "auto_disk_config" properties, which are presumed to be xenapi
specific. The change also alters the inheritance logic to ensure
that the work-around listing of image properties in
non_inheritable_image_properties is no longer necessary; the
default for this configuration option is updated accordingly.
(Note: It will not harm anything to have these image properties
still listed in non_inheritable_image_properties, so configurations
that override this option do not need to be altered.)
Change-Id: I3514da432cc10c75418e1de9752f60640d579136
Next up in
commit 8e575be75c80ea71a6ad8fb73e6ace1ed708938f
Author: Xavier Queralt <xqueralt@xxxxxxxxxx>
Date: Mon Aug 26 22:53:03 2013 +0200
Add methods to get image metadata from instance
This patch adds a couple of utility functions that enclose all the logic
for getting and parsing the image metadata stored in the instance's
system metadata.
First, this will try to fetch the metadata from the real image and will
prevent it from failing if it is not available. It will be then merged
with the image metadata stored during the instance creation.
Related to bug #1039662
Change-Id: I2130caf19858585571b1199e27f0a98ad5f08701
The nova.utils.get_image_from_system_metadata() method added in this commit includes the logic from the compute api create_image method to drop image metadata properties listed in CONF.non_inheritable_image_properties.
Finally many areas of the codebase are updated to use
nova.utils.get_image_from_system_metadata (or
nova.compute.utils.get_image_metadata) in this commit:
commit 4389f2292a0177c8eedc0a398ceb3c5535a9ef82
Author: Xavier Queralt <xqueralt@xxxxxxxxxx>
Date: Mon Aug 26 22:55:46 2013 +0200
Avoid errors on some actions when image not usable
Using the metadata saved on instance creation, we can now get all the
image related metadata we need from the instance itself.
This patch replace the logic for getting the image metadata on some
actions that shouldn't fail when the image is not accessible (create
an snapshot, resize, migrate, rescue an instance or attach an
interface).
Fixes bug 1039662
Change-Id: Id8c2f13ca96908317d271a84fd685104b64f87e9
This is a mistake, because the CONF.non_inheritable_image_properties
config property was *only* intended to filter out image properties
when uploading snapshot images. It is now filtering out properties in
a great many non-snapshot related code paths. For example, when hot-
plugging a network interface to a running guest, it filters out image
properties that might be needed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1459760/+subscriptions
References