Comment 17 for bug 1436166

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

Reviewed: https://review.openstack.org/288594
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b806adb032567c2c84d61834e6f8d2684723c194
Submitter: Jenkins
Branch: stable/liberty

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)