Mutually exclusive options snapshot-id, source-volid and image-id are not correctly enforced

Bug #1161437 reported by stephen mulcahy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
stephen mulcahy

Bug Description

At most only one of snapshot-id, source-volid or image-id should be specified during a volume creation. At the moment, the volumes api only partially enforces this, accepting some combinations of these arguments and silently ignoring them.

cinder/volume/api.py line 92 has check

        if ((snapshot is not None) and (source_volume is not None)):

i.e., no check for image_id/imageRef

and

cinder/api/v1/volumes.py and cinder/api/v2/volumes.py

has the check

if snapshot_id and image_href:

i.e. no check for combination of image_id/ImageRef and source volume

Changed in cinder:
assignee: nobody → stephen mulcahy (stephen-mulcahy)
Changed in cinder:
status: New → Confirmed
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/25624

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/25624
Committed: http://github.com/openstack/cinder/commit/a4540aae666347c1a7e6f17330232a5d33cc4893
Submitter: Jenkins
Branch: master

commit a4540aae666347c1a7e6f17330232a5d33cc4893
Author: Stephen Mulcahy <email address hidden>
Date: Thu Mar 28 15:46:16 2013 +0000

    Enforce exclusive options snapshot-id, source-volid and image-id

    Fixed checks in api that volume create receives only one of
    snapshot-id, source-volid or image-id.

    Fixes bug #1161437

    Change-Id: Ibe5ca4bb81e69b0f8e1abe1c2cffe587dc10e3ca

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-1 → 2013.2
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.