Deleting a snapshot leads to deleting its parent volume

Bug #1360173 reported by Alexander Rubtsov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Committed
High
Ivan Kolodyazhny
5.0.x
Fix Committed
High
Ivan Kolodyazhny

Bug Description

Release: MOS 5.0
OS: CentOS

Description:
When I delete a snapshot , either via horizon or the cli ,the volume from which the snapshot was created from is also deleted

Upstream bug:
https://bugs.launchpad.net/cinder/+bug/1270192
Need to verify fix (targeted to Cinder 2014.1.2) and backport if required (MOS 5.0.1 contains Cinder 2014.1.1)

Steps to reproduce:
[root@node-10 dev]# cinder create --display-name mirantis2 5
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2014-08-22T05:16:35.238133 |
| display_description | None |
| display_name | mirantis2 |
| encrypted | False |
| id | 7cad9151-ee7c-488c-9f65-889849f4f100 |
| metadata | {} |
| size | 5 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+

[root@node-10 dev]# cinder snapshot-create --display-name mirantis2_snapshot 7cad9151-ee7c-488c-9f65-889849f4f100
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| created_at | 2014-08-22T05:17:00.643869 |
| display_description | None |
| display_name | mirantis2_snapshot |
| id | 8ab384dc-6235-4ba5-93f4-e009e606ebdb |
| metadata | {} |
| size | 5 |
| status | creating |
| volume_id | 7cad9151-ee7c-488c-9f65-889849f4f100 |
+---------------------+--------------------------------------+

[root@node-10 dev]# ls -al /dev/mapper
total 0
drwxr-xr-x 2 root root 220 Aug 22 05:17 .
drwxr-xr-x 20 root root 3940 Aug 22 05:17 ..
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-_snapshot--8ab384dc--6235--4ba5--93f4--e009e606ebdb -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-_snapshot--8ab384dc--6235--4ba5--93f4--e009e606ebdb-cow -> ../dm-7
lrwxrwxrwx 1 root root 7 Aug 21 14:02 cinder-volume--0a0335df--4724--433b--808a--a1fdc0ac18ee -> ../dm-3
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-volume--7cad9151--ee7c--488c--9f65--889849f4f100 -> ../dm-4
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-volume--7cad9151--ee7c--488c--9f65--889849f4f100-real -> ../dm-6
crw-rw---- 1 root root 10, 58 Aug 21 12:54 control
lrwxrwxrwx 1 root root 7 Aug 21 12:54 image-glance -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 21 12:54 os-root -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 21 12:54 os-swap -> ../dm-1

[root@node-10 dev]# cinder snapshot-delete 8ab384dc-6235-4ba5-93f4-e009e606ebdb

[root@node-10 dev]# ls -al /dev/mapper
total 0
drwxr-xr-x 2 root root 220 Aug 22 05:17 .
drwxr-xr-x 20 root root 3940 Aug 22 05:17 ..
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-_snapshot--8ab384dc--6235--4ba5--93f4--e009e606ebdb -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-_snapshot--8ab384dc--6235--4ba5--93f4--e009e606ebdb-cow -> ../dm-7
lrwxrwxrwx 1 root root 7 Aug 21 14:02 cinder-volume--0a0335df--4724--433b--808a--a1fdc0ac18ee -> ../dm-3
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-volume--7cad9151--ee7c--488c--9f65--889849f4f100 -> ../dm-4
lrwxrwxrwx 1 root root 7 Aug 22 05:17 cinder-volume--7cad9151--ee7c--488c--9f65--889849f4f100-real -> ../dm-6
crw-rw---- 1 root root 10, 58 Aug 21 12:54 control
lrwxrwxrwx 1 root root 7 Aug 21 12:54 image-glance -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 21 12:54 os-root -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 21 12:54 os-swap -> ../dm-1

[root@node-10 dev]# ls -al /dev/mapper
total 0
drwxr-xr-x 2 root root 140 Aug 22 05:17 .
drwxr-xr-x 20 root root 3860 Aug 22 05:17 ..
lrwxrwxrwx 1 root root 7 Aug 21 14:02 cinder-volume--0a0335df--4724--433b--808a--a1fdc0ac18ee -> ../dm-3
crw-rw---- 1 root root 10, 58 Aug 21 12:54 control
lrwxrwxrwx 1 root root 7 Aug 21 12:54 image-glance -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 21 12:54 os-root -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 21 12:54 os-swap -> ../dm-1

Changed in mos:
importance: Undecided → High
assignee: nobody → Ivan Kolodyazhny (e0ne)
milestone: none → 5.1
status: New → Triaged
Ivan Kolodyazhny (e0ne)
Changed in mos:
status: Triaged → In Progress
Ivan Kolodyazhny (e0ne)
tags: added: cinder
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :
Revision history for this message
Dmitry Mescheryakov (dmitrymex) wrote :

Ivan, as far as I understand, the following CR in stable/icehouse fixes the issue: https://review.openstack.org/#/c/106300/ . The change didn't make it in either 5.1 or 5.0.2. Or am I missing something?

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Dmitry, sorry, it was my mistake. I'll backport this fix to MOS

Ivan Kolodyazhny (e0ne)
Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
OSCI Robot (oscirobot) wrote :

RPM package cinder has been built for project openstack/cinder
Package version == 2014.1.1, package release == fuel5.0.1.mira4.git.07c4414.4bfc7ce

Changeset: https://review.fuel-infra.org/1669
project: openstack/cinder
branch: openstack-ci/fuel-5.0.1/2014.1.1
author: Ivan Kolodyazhny
committer: Ivan Kolodyazhny
subject: Retry lvremove with ignore_suspended_devices
status: patchset-created

Files placed on repository:
openstack-cinder-2014.1.1-fuel5.0.1.mira4.git.07c4414.4bfc7ce.noarch.rpm
openstack-cinder-doc-2014.1.1-fuel5.0.1.mira4.git.07c4414.4bfc7ce.noarch.rpm
python-cinder-2014.1.1-fuel5.0.1.mira4.git.07c4414.4bfc7ce.noarch.rpm

NOTE: Changeset is not merged, created temporary package repository.
RPM repository URL: http://osci-obs.vm.mirantis.net:82/centos-fuel-5.0.1-stable-1669/centos

Revision history for this message
OSCI Robot (oscirobot) wrote :

DEB package cinder has been built for project openstack/cinder
Package version == 2014.1.1, package release == fuel5.0.1~mira0+git.07c4414.4bfc7ce

Changeset: https://review.fuel-infra.org/1669
project: openstack/cinder
branch: openstack-ci/fuel-5.0.1/2014.1.1
author: Ivan Kolodyazhny
committer: Ivan Kolodyazhny
subject: Retry lvremove with ignore_suspended_devices
status: patchset-created

Files placed on repository:
cinder-api_2014.1.1-fuel5.0.1~mira0+git.07c4414.4bfc7ce_all.deb
cinder-backup_2014.1.1-fuel5.0.1~mira0+git.07c4414.4bfc7ce_all.deb
cinder-common_2014.1.1-fuel5.0.1~mira0+git.07c4414.4bfc7ce_all.deb
cinder-scheduler_2014.1.1-fuel5.0.1~mira0+git.07c4414.4bfc7ce_all.deb
cinder-volume_2014.1.1-fuel5.0.1~mira0+git.07c4414.4bfc7ce_all.deb
python-cinder_2014.1.1-fuel5.0.1~mira0+git.07c4414.4bfc7ce_all.deb

NOTE: Changeset is not merged, created temporary package repository.
DEB repository URL: http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-5.0.1-stable-1669/ubuntu

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/cinder (openstack-ci/fuel-5.0.1/2014.1.1)

Change abandoned by Ivan Kolodyazhny <email address hidden> on branch: openstack-ci/fuel-5.0.1/2014.1.1
Review: https://review.fuel-infra.org/1669

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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