Comment 9 for bug 1247296

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

Reviewed: https://review.openstack.org/55934
Committed: http://github.com/openstack/nova/commit/11e327f888a6dbde990d75196560083fddecf394
Submitter: Jenkins
Branch: master

commit 11e327f888a6dbde990d75196560083fddecf394
Author: Maithem <email address hidden>
Date: Mon Nov 11 16:08:02 2013 -0800

    VMware: Always upload a snapshot as a preallocated disk

    Currently, a snapshot operation always produces a preallocated
    disk type. When the snapshot is uploaded to glance, the source
    image metadata is uploaded with the new snapshot and then some
    of the metadata properties are updated. The update doesn't
    include the disk_type property, this can be problematic. If
    the original image has a sparse disk type and a snapshot is
    taken, then the snapshot which is a preallocated disk type is
    uploaded to glance with the disk_type property set to sparse,
    which creates a disk type mismatch and causes errors when a vm
    is spawned from that snapshot. This patch addresses the issue
    by correcting the image metadata used when uploading a snapshot
    to glance.

    Also, the image_upload function in vmwareapi/fake.py has been
    modified to address the change. Any function call to
    image_upload (from the unit tests) will assert that the
    metadata for the image to be uploaded must have the disk_type
    value to be preallocated.

    Closes-Bug: 1247296
    Change-Id: I71cfa8d4d1eb7911abb489153292fb0d1e614765