It'd be better to raise exception when trying to copy Glance metadata
from source (volume/snapshot) to destination (volume/snapshot) rather
than silent failure, which is exactly the reason there's unspotted error
inside glance_meta unittest but it was able to pass.
With this fix, one should _not_ directly call glance_metadata_copy()
without looking at source's bootable flags. This patch also refactors
_create_volume_from_snapshot() and _create_from_source_volume() to only
do Glance metadata copy when needed (bootable is True).
Reviewed: https:/ /review. openstack. org/41601 github. com/openstack/ cinder/ commit/ 3e68c6be7405bb2 39ad7d2c8211734 4bdddcfa99
Committed: http://
Submitter: Jenkins
Branch: master
commit 3e68c6be7405bb2 39ad7d2c8211734 4bdddcfa99
Author: Zhiteng Huang <email address hidden>
Date: Tue Aug 13 12:57:17 2013 +0800
Raise exception when Glance metadata not found.
It'd be better to raise exception when trying to copy Glance metadata metadata_ copy() volume_ from_snapshot( ) and _create_ from_source_ volume( ) to only
from source (volume/snapshot) to destination (volume/snapshot) rather
than silent failure, which is exactly the reason there's unspotted error
inside glance_meta unittest but it was able to pass.
With this fix, one should _not_ directly call glance_
without looking at source's bootable flags. This patch also refactors
_create_
do Glance metadata copy when needed (bootable is True).
Fix bug: 1211632
Change-Id: I28f065e21cf24c 81f98b00e171fcb e4f64ec76b6