[LVMiSCSI] A volume is deleted unexpectedly during volume migration when src and dst VG names are same

Bug #1404013 reported by Mitsuhiro Tanino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Mitsuhiro Tanino

Bug Description

When using LVMISCSIDriver, a volume is unexpectedly deleted during volume migration operation.
This problem only occurs when the volume_group of backend A and backend B is same value by misconfiguration.
Even if the configuration is wrong, cinder should not delete the volume unexpectedly for user.

----- cinder.conf
enabled_backends=LVM_iscsi_drv,LVM_iscsi_drv2

[LVM_iscsi_drv]
volume_group=stack-volumes
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=LVM_iscsi

[LVM_iscsi_drv2]
volume_group=stack-volumes
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=LVM_iscsi
-----

Recreation Steps
(1) Configure multiple LVMiSCSI backend using same VG
(2) Create a new volume
(3) Migrate the volume to other backend

Logs
$ cinder-manage host list
control.com nova
control.com@LVM_iscsi_drv2 nova
control.com@LVM_iscsi_drv nova
$ sudo lvs
$ cinder create --name iscsi1 --volume-type LVM_iscsi 1
....
$ cinder list
+--------------------------------------+-----------+--------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------+------+-------------+----------+-------------+
| a57240ea-c06a-4a22-95f7-090fa88a6b42 | available | iscsi1 | 1 | LVM_iscsi | false | |
+--------------------------------------+-----------+--------+------+-------------+----------+-------------+
$ sudo lvs
  LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
  volume-a57240ea-c06a-4a22-95f7-090fa88a6b42 stack-volumes -wi-a----- 1.00g
$ cinder migrate a57240ea-c06a-4a22-95f7-090fa88a6b42 control.com@LVM_iscsi_drv2#LVM_iscsi
$ sudo lvs
$ sudo lvs

Whole c-vol log is here.
http://paste.openstack.org/show/152875/

Changed in cinder:
assignee: nobody → Mitsuhiro Tanino (mitsuhiro-tanino)
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/142922

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/142922
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=37e35047062b66321f9af6393b2b1c609af54e1a
Submitter: Jenkins
Branch: master

commit 37e35047062b66321f9af6393b2b1c609af54e1a
Author: Mitsuhiro Tanino <email address hidden>
Date: Thu Dec 18 09:07:24 2014 -0500

    LVM: Volume is deleted unexpectedly during volume migration

    When using LVMISCSIDriver, a volume is unexpectedly deleted during
    volume migration operation. This problem only occurs when the
    volume_group of backend A and backend B is same value such as
    misconfiguration. Even if the configuration is wrong, cinder should
    not delete the volume unexpectedly for user.

    Closes-Bug: 1404013
    Change-Id: I010be0c70589459a488cdef7cd83380eab27c61c

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

Remote bug watches

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