Comment 13 for bug 1200800

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

Reviewed: https://review.openstack.org/41483
Committed: http://github.com/openstack/cinder/commit/870e984274d9e8d452e7aa383b289955b6896f28
Submitter: Jenkins
Branch: master

commit 870e984274d9e8d452e7aa383b289955b6896f28
Author: Jay S. Bryant <email address hidden>
Date: Mon Aug 12 12:55:48 2013 -0500

    Add check for qemu-img to image_utils fetch_to_raw

    Some platforms, particularly PowerPC systems running RHEL,
    do not have qemu-img installed by default and do not
    support image formats other than RAW. For these systems,
    functions/drivers that use fetch_to_raw() currently fail
    because it is assumed that qemu-img will always be installed.

    This change updates fetch_to_raw() to function more like the
    upload_volume() function which checks the image format and skips
    any conversion if the image is already in the RAW format. To
    minimize the impact upon platforms that have qemu-img installed
    this is being implemented by checking to see if qemu-img is
    installed. If it is installed, no changes are made to the flow
    through fetch_to_raw. If qemu-img is not available and the image
    format is not already RAW, an exception is thrown. Otherwise,
    the image is downloaded and we do not progress to the portions of
    fetch_to_raw that require qemu-img to be installed.

    This commit also updates the test cases that touch this code.

    Closes-bug: 1200800

    Change-Id: I34540dfa238a8b8e61ff5c30c7e121130bad39b4