commit 9a4ecfd96dad32fd4726c46dc6d89e956f1f2a29
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.
Reviewed: https:/ /review. openstack. org/264349 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=9a4ecfd96da d32fd4726c46dc6 d89e956f1f2a29
Committed: https:/
Submitter: Jenkins
Branch: master
commit 9a4ecfd96dad32f d4726c46dc6d89e 956f1f2a29
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.
Change-Id: I4fa1c258db58c7 0dfbf0178b7bb13 978fda3a11f
Closes-Bug: #1436166