commit b806adb032567c2c84d61834e6f8d2684723c194
Author: Chris Dent <email address hidden>
Date: Mon Jan 11 12:05:00 2016 +0000
Propagate qemu-img errors to compute manager
When qemu-img is called with oslo_concurrency.process_utils.execute
the ProcessExecutionError was raised when qemu-img either fails to
execute or has a non-zero exit code. This error did not propagate
up to the compute manager with any meaningful information meaning
that if an instance build fails the error message is the generic
"There are not enough hosts available".
This change captures ProcessExecutionError and re-raises the
exception as either InvalidDiskInfo (in qemu_img_info) or
ImageUnacceptable (in convert_image and fetch_to_raw) and makes the
manager accept this as a cause for a BuildAbortException on the
logic that if the image is bad, things are dire, let's bail.
Based on the code in qemu_img_info it appears there was a
misunderstanding of how process_utils.execute behaves so it seems
likely this problem is present elsewhere in the code. This change
attempts to only address the issue as it shows up on the new
instance path described in the related bug.
Conflicts:
nova/virt/images.py
Change-Id: I4fa1c258db58c70dfbf0178b7bb13978fda3a11f
Closes-Bug: #1436166
(cherry picked from commit 9a4ecfd96dad32fd4726c46dc6d89e956f1f2a29)
Reviewed: https:/ /review. openstack. org/288594 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b806adb0325 67c2c84d61834e6 f8d2684723c194
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit b806adb032567c2 c84d61834e6f8d2 684723c194
Author: Chris Dent <email address hidden>
Date: Mon Jan 11 12:05:00 2016 +0000
Propagate qemu-img errors to compute manager
When qemu-img is called with oslo_concurrenc y.process_ utils.execute nError was raised when qemu-img either fails to
the ProcessExecutio
execute or has a non-zero exit code. This error did not propagate
up to the compute manager with any meaningful information meaning
that if an instance build fails the error message is the generic
"There are not enough hosts available".
This change captures ProcessExecutio nError and re-raises the ptable (in convert_image and fetch_to_raw) and makes the
exception as either InvalidDiskInfo (in qemu_img_info) or
ImageUnacce
manager accept this as a cause for a BuildAbortException on the
logic that if the image is bad, things are dire, let's bail.
Based on the code in qemu_img_info it appears there was a nding of how process_ utils.execute behaves so it seems
misundersta
likely this problem is present elsewhere in the code. This change
attempts to only address the issue as it shows up on the new
instance path described in the related bug.
Conflicts: virt/images. py
nova/
Change-Id: I4fa1c258db58c7 0dfbf0178b7bb13 978fda3a11f d4726c46dc6d89e 956f1f2a29)
Closes-Bug: #1436166
(cherry picked from commit 9a4ecfd96dad32f