nova/nova/tests/unit/conductor
Daniel P. Berrange 77ecc3d8c5 compute: remove get_image_metadata method
The get_image_metadata method has some unhelpful semantics
where it takes the image metadata from the instance's
system metadata record, and then overwrites it with the
current metadata associated with the original image.

The result is that, if the image metadata in glance was
changed after the instance was first booted, Nova will
end up making decisions based on image metadata that does
not correspond to that which the instance was booted with.
Since the image metadata controls many aspects of hardware
configuration, this could lead to incorrect behaviour when
modifying hardware later, eg disk/vif/pci hotplug.

What is worse, is that some of the nova operations will
update the instance system metadata when completed, thus
permanently overwriting the original image metadata with
the new data.

Almost all code which operates against an existing instance
is updated to use nova.utils.get_image_from_system_metadata.
The exception is the rescue codepath, which must use the
metadata associated with the new rescue image.

The nova.compute.utils.get_image_metadata method can thus
be removed from use, avoiding the problematic logic.

Closes-bug: #1460079
Change-Id: I35c9d26e3967e93a2c368c3f9fdc807a69816dd2
2015-06-09 11:40:48 +01:00
..
tasks compute: remove get_image_metadata method 2015-06-09 11:40:48 +01:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_conductor.py compute: remove get_image_metadata method 2015-06-09 11:40:48 +01:00