vmware driver accesses volume['instance_uuid']

Bug #1436603 reported by Walt Boring
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Walt Boring

Bug Description

The vmware/vmdk.py file incorrectly accesses columns in the volume object that no longer exist.

def copy_volume_to_image():

        if volume['instance_uuid'] or volume['attached_host']:
            msg = _("Upload to glance of attached volume is not supported.")
            LOG.error(msg)
            raise exception.InvalidVolume(msg)

instance_uuid and attached_host no longer live in the volume object, but volume_attachments object.

Tags: driver vmware
Changed in cinder:
importance: Undecided → Critical
tags: added: driver
tags: added: vmware
Revision history for this message
Walt Boring (walter-boring) wrote :

volume['volume_attachment'] will be a list if there are any attachments made.

Revision history for this message
Mike Perez (thingee) wrote :

Did their CI catch this?

Changed in cinder:
milestone: none → kilo-rc1
importance: Critical → Medium
Changed in cinder:
assignee: nobody → Vipin Balachandran (vbala)
Revision history for this message
Walt Boring (walter-boring) wrote :

I think that some 3rd party CI is skipping the volume upload tests. I just found this by grepping.

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

Fix proposed to branch: master
Review: https://review.openstack.org/167884

Changed in cinder:
assignee: Vipin Balachandran (vbala) → Walt Boring (walter-boring)
status: New → In Progress
Revision history for this message
Vipin Balachandran (vbala) wrote :

Test test_volume_upload was added to exclude list due to bug 1237338. It's a mistake that it was not enabled after the fix.

Changed in cinder:
assignee: Walt Boring (walter-boring) → Vipin Balachandran (vbala)
Changed in cinder:
assignee: Vipin Balachandran (vbala) → Walt Boring (walter-boring)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/167884
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=5fdada85969ca770db60892e2c4f67d917efa0d5
Submitter: Jenkins
Branch: master

commit 5fdada85969ca770db60892e2c4f67d917efa0d5
Author: Walter A. Boring IV <email address hidden>
Date: Thu Mar 26 05:09:59 2015 +0000

    VMware: Fixed usage of volume instance_uuid

    instance_uuid and attached_host no longer exist in the volume object.
    They have been moved into the volume_attachment list attachments.

    This patch now tests for non-empty volume_attachment list instead of
    testing the existence of a non None value of instance_uuid.

    Change-Id: I04c46dc49849fb1e0abf955dcc6d7ec1ce5e57a5
    Closes-Bug: 1436603

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-rc1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.