ThinLVM create volume from snapshot fails

Bug #1210853 reported by Eric Harney on 2013-08-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
Eric Harney
Grizzly
High
Eric Harney

Bug Description

Master branch at b28e706a

$ grep ^volume_driver /etc/cinder/cinder.conf
volume_driver=cinder.volume.drivers.lvm.ThinLVMVolumeDriver

$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+--------------------------------------+-----------+--------------+------+
| 0679dfdf-f95c-4af7-931e-b1ac1eb2c66d | 1a76b325-81b5-416a-a66e-935fb0e66797 | available | None | 1 |
+--------------------------------------+--------------------------------------+-----------+--------------+------+

$ cinder create --snapshot-id 0679dfdf-f95c-4af7-931e-b1ac1eb2c66d 1

results in

TRACE cinder.volume.flows.create_volume Traceback (most recent call last):
TRACE cinder.volume.flows.create_volume File "/opt/stack/cinder/cinder/taskflow/patterns/linear_flow.py", line 172, in run_it
TRACE cinder.volume.flows.create_volume result = runner(context, *args, **kwargs)
TRACE cinder.volume.flows.create_volume File "/opt/stack/cinder/cinder/taskflow/utils.py", line 260, in __call__
TRACE cinder.volume.flows.create_volume self.result = self.task(*args, **kwargs)
TRACE cinder.volume.flows.create_volume File "/opt/stack/cinder/cinder/volume/flows/create_volume.py", line 1383, in __call__
TRACE cinder.volume.flows.create_volume **volume_spec)
TRACE cinder.volume.flows.create_volume File "/opt/stack/cinder/cinder/volume/flows/create_volume.py", line 1159, in _create_from_snapshot
TRACE cinder.volume.flows.create_volume snapshot_ref)
TRACE cinder.volume.flows.create_volume File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 140, in create_volume_from_snapshot
TRACE cinder.volume.flows.create_volume self._create_volume(volume['name'], self._sizestr(volume['size']))
TRACE cinder.volume.flows.create_volume TypeError: _create_volume() takes exactly 2 arguments (3 given)
TRACE cinder.volume.flows.create_volume

_create_volume() is called from LVMVolumeDriver, which works for the LVMISCSIDriver subclass, but the ThinLVMVolumeDriver class's _create_volume() method expects different parameters.

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

Changed in cinder:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Eric Harney (eharney) on 2013-08-10
tags: added: grizzly-backport-potential
Changed in cinder:
importance: Undecided → High
Eric Harney (eharney) on 2013-08-13
Changed in cinder:
milestone: none → havana-3
Eric Harney (eharney) wrote :

If https://review.openstack.org/#/c/38172/ merges first this will become Invalid for Cinder master branch, but is required for Grizzly regardless.

Reviewed: https://review.openstack.org/41262
Committed: http://github.com/openstack/cinder/commit/7323d8751538e06bb2dba106ba394bc6e29b8b84
Submitter: Jenkins
Branch: master

commit 7323d8751538e06bb2dba106ba394bc6e29b8b84
Author: Eric Harney <email address hidden>
Date: Sat Aug 10 16:12:59 2013 -0400

    Fix signature of _create_volume() in ThinLVMVolumeDriver

    create_volume_from_snapshot will call _create_volume() with the
    wrong parameters when using ThinLVMVolumeDriver. It should be
    compatible with LVMVolumeDriver's _create_volume() method.

    Fixes bug: 1210853

    Change-Id: I18f7baf60601b3bcf01425b505a0579a826f072e

Changed in cinder:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/41274
Committed: http://github.com/openstack/cinder/commit/74a2154150a27f994ee5b17d9cef26e5ba1ce95c
Submitter: Jenkins
Branch: stable/grizzly

commit 74a2154150a27f994ee5b17d9cef26e5ba1ce95c
Author: Eric Harney <email address hidden>
Date: Sat Aug 10 16:12:59 2013 -0400

    Fix signature of _create_volume() in ThinLVMVolumeDriver

    create_volume_from_snapshot will call _create_volume() with the
    wrong parameters when using ThinLVMVolumeDriver. It should be
    compatible with LVMVolumeDriver's _create_volume() method.

    Fixes bug: 1210853

    Conflicts:
     cinder/volume/drivers/lvm.py

    (cherry picked from commit 7323d8751538e06bb2dba106ba394bc6e29b8b84)
    Change-Id: I18f7baf60601b3bcf01425b505a0579a826f072e

tags: added: in-stable-grizzly
Thierry Carrez (ttx) on 2013-09-05
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-3 → 2013.2
Alan Pevec (apevec) on 2014-03-31
tags: removed: grizzly-backport-potential in-stable-grizzly
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers