Comment 11 for bug 1247296

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

Reviewed: https://review.openstack.org/74859
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9520b8dfc207d0183ef53e84a480270e832d6c70
Submitter: Jenkins
Branch: stable/havana

commit 9520b8dfc207d0183ef53e84a480270e832d6c70
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
    (cherry picked from commit 11e327f888a6dbde990d75196560083fddecf394)

    Conflicts:

     nova/tests/virt/vmwareapi/test_vmwareapi.py
    Change-Id: I71cfa8d4d1eb7911abb489153292fb0d1e614765