create volume from image fails

Bug #1129199 reported by Mate Lakat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Mate Lakat

Bug Description

Creating a volume from an image fails.

cinder create --display_name="created-volume" --image-id $IMAGEID 1

The volume status will be creating, and immediately after that, it becomes available, not downloading the image.

This bug has been introduced here:
https://review.openstack.org/20514

The problem is:
In the old code:
https://github.com/openstack/cinder/blob/275ce2d171d847ede99162a3dbf85d87999a7298/cinder/volume/manager.py#L170

The condition was:
all(x is None for x in(snapshot_id, image_id, source_volid))

Whereas after the change:
all(x is None for x in(snapshot_ref, image_location, srcvol_ref))

So basically image_id was replaced by image_location

Mate Lakat (mate-lakat)
Changed in cinder:
assignee: nobody → Mate Lakat (mate-lakat)
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/22208

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

Reviewed: https://review.openstack.org/22208
Committed: http://github.com/openstack/cinder/commit/8466bb3411bb82411fe51ef86e4c0080678bf753
Submitter: Jenkins
Branch: master

commit 8466bb3411bb82411fe51ef86e4c0080678bf753
Author: Mate Lakat <email address hidden>
Date: Mon Feb 18 15:33:28 2013 +0000

    Fix create volume from image.

    Fix for bug 1129199

    During creating a volume from an image, the volume status changed
    from creating to active, skipping the download phase. This bug was most
    likely introduced during:
    https://review.openstack.org/20514
    This patch fixes the issue by change image_location back to image_id at
    the correct place.
    This patch also fixes an error in the exception handling, and the update
    of the volume status after creation.

    Change-Id: Ib9b647031c029387b776c27f9233388bd2c67e9c

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