]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix handling ImageUnacceptable in create_volume
authorJay S. Bryant <jsbryant@us.ibm.com>
Mon, 12 Aug 2013 16:46:06 +0000 (11:46 -0500)
committerJay S. Bryant <jsbryant@us.ibm.com>
Mon, 12 Aug 2013 16:53:41 +0000 (11:53 -0500)
commit9404eb1591cd5133d8ed9d1675f809b221ff2cde
treebdb251d241f9d0ed8fd68834d7aed2cec639de49
parentdf0b6c54189758ed1570770bdc555d799438489d
Fix handling ImageUnacceptable in create_volume

In the create_volume flow ImageUnacceptable exceptions are
not properly handled.  _copy_image_to_volume can receive an
ImageUnacceptable exception from copy_image_to_volume if fetch_to_raw
is used.  Currently the ImageUnacceptable exception is changed to
a generic ImageCopyFailure exception which does not make the cause
of the excpetion clear.

This change adds handling and raising ImageUnacceptable exceptions
in _copy_image_to_volume.  It also adds the exception to
no_reschedule_types as it doesn't make sense to keep retrying the
copy if the image was found to be unacceptable.

fixes bug 1209021

Change-Id: I9aacf23dfaaa1a4df0a869d1c9544c376488f01b
cinder/volume/flows/create_volume.py