block device mapping transformation doesn't handle "image" source

Bug #1411847 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Eric Harney

Bug Description

I hit this while implementing volume snapshots for the NFS Cinder driver. I booted an instance from an image with the destination as a volume.

nova boot --block-device id=fc19829e-5f65-4e9c-acf3-0e898747506f,source=image,dest=volume,size=2,bootindex=0,shutdown=preserve ...

Creating a volume snapshot for this case will run down _volume_refresh_connection_info in LibvirtDriver, which fails in DriverVolumeBlockDevice's _transform, which only allows 'volume' as a source type.

It looks to me like this code should allow 'image' as a source, but I'm not an expert in this area in Nova...

Eric Harney (eharney)
Changed in nova:
status: New → In Progress
assignee: nobody → Eric Harney (eharney)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Eric Harney (<email address hidden>) on branch: master
Review: https://review.openstack.org/148010
Reason: Replaced by https://review.openstack.org/#/c/149035/

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

Reviewed: https://review.openstack.org/149035
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4b0fee091f500d82ab63b3dad4c597f27c4a36ad
Submitter: Jenkins
Branch: master

commit 4b0fee091f500d82ab63b3dad4c597f27c4a36ad
Author: Eric Harney <email address hidden>
Date: Wed Jan 21 13:57:50 2015 -0500

    libvirt: Create correct BDM object type for conn info update

    This path needs to use different types for devices with
    an image vs. volume source_type.

    Validation will fail for image sources if only the volume
    type is used.

    Closes-Bug: #1411847

    Change-Id: I711c34d340e4f87fa29ec604eb534ce6cd357196

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/150090
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=42ea00eece1d67b79525421a796ee4a838a3fe82
Submitter: Jenkins
Branch: master

commit 42ea00eece1d67b79525421a796ee4a838a3fe82
Author: Nikola Dipanov <email address hidden>
Date: Mon Jan 26 16:50:45 2015 +0100

    Add methods that convert any volume BDM to driver format

    There are places in the code where we need to get the DriverBlockDevice
    instance based on the BDM object for a volume block device, however the
    DriverBlockDevice class the object maps to (based on source of
    the data) can be any of the following: volume, snapshot or image, all of
    which are actually separate classes that extend VolumeDriverBlockDevice.

    This patch adds a method to transform a volume BDM object to the correct
    class instance, so that we can more easily avoid bugs such as 1411847.

    Related-Bug: #1411847

    Change-Id: I3496bab7aac448722240483b86c013e5f80d0cb5

Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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