cinder allows creation of volume from snapshot that is larger than specified volume size

Bug #1161841 reported by stephen mulcahy on 2013-03-29
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Medium
Jean-Baptiste RANSY

Bug Description

To reproduce:

1. cinder create 5
2. cinder snapshot-create <volume id from 1>
3. cinder create --snapshot-id <snapshot id from 2> 1

Note that we are creating a 1G volume from a snapshot of a 5G volume

Resulting volume does go to error state but should the api not check the snapshot size when initial request is received and reject it due to invalid size?

description: updated
Changed in cinder:
importance: Undecided → Medium
status: New → Triaged
Changed in cinder:
assignee: nobody → Jean-Baptiste RANSY (jean-baptiste-ransy)

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

Changed in cinder:
status: Triaged → In Progress

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

commit cabca4fd3046503bcd917eba0cdd400491ba89cd
Author: Jean-Baptiste RANSY <email address hidden>
Date: Sat Mar 30 15:25:29 2013 +0100

    Prevent create volume from snapshot with bad size

    Prevent to create a volume from a snapshot with a volume size less
    than the snapshot size.

    Check if a volume size is specified that it is less than
    the snapshot size.

    Raise a exception if it's lesser.

    Fixes bug 1161841

    Change-Id: Ic1afbfb025ce0b3906c35c6c50a71734d74a9851

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-05-29
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers