Comment 14 for bug 1436166

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/264349
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9a4ecfd96dad32fd4726c46dc6d89e956f1f2a29
Submitter: Jenkins
Branch: master

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.

    Change-Id: I4fa1c258db58c70dfbf0178b7bb13978fda3a11f
    Closes-Bug: #1436166