Bug 1437392 - [Ceph] Failed to delete a volume with its associated snapshot
Summary: [Ceph] Failed to delete a volume with its associated snapshot
Keywords:
Status: CLOSED DUPLICATE of bug 1764324
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Jon Bernard
QA Contact: Tzach Shefi
URL:
Whiteboard:
: 1254470 (view as bug list)
Depends On: 1870282
Blocks: 1135132 1570420 1574364
TreeView+ depends on / blocked
 
Reported: 2017-03-30 09:00 UTC by lkuchlan
Modified: 2022-08-30 12:04 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
May need to review, but see https://access.redhat.com/solutions/3214921 Cause: Consequence: Workaround (if any): Result:
Clone Of:
Environment:
Last Closed: 2021-04-01 09:30:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cinder logs (126.65 KB, application/zip)
2017-03-30 09:00 UTC, lkuchlan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1677525 0 None None None 2017-03-30 09:03:32 UTC
Red Hat Issue Tracker OSP-1715 0 None None None 2022-08-30 12:04:09 UTC
Red Hat Knowledge Base (Solution) 3214921 0 None None None 2019-10-08 21:52:31 UTC

Description lkuchlan 2017-03-30 09:00:14 UTC
Created attachment 1267449 [details]
cinder logs

Description of problem:
I have created a volume and snapshot. I have tried to delete the volume with its snapshot by
using 'cascade' argument. And indeed, both volume and snapshot were deleted. 
But when I have repeated on this scenario while there is another volume from
that snapshot, the deletion process failed.  
The deletion failure happens only in ceph driver.

Version-Release number of selected component (if applicable):
python-cinder-9.1.1-3.el7ost.noarch
openstack-cinder-9.1.1-3.el7ost.noarch
python-cinderclient-1.9.0-4.el7ost.noarch
puppet-cinder-9.4.1-3.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:

1. Create a volume.

[stack@undercloud-0 ~]$ cinder create 1
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2017-03-30T08:10:20.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | a0d485d5-f893-43f5-8a40-e1e762482c11 |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | None                                 |
| os-vol-host-attr:host          | hostgroup@tripleo_ceph#tripleo_ceph  |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 7f554817cae44d38a697954b360ed350     |
| replication_status             | disabled                             |
| size                           | 1                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | available                            |
| updated_at                     | 2017-03-30T08:10:20.000000           |
| user_id                        | 59007ad16aca4714888a74a3b63dde57     |
| volume_type                    | None                                 |
+--------------------------------+--------------------------------------+

2. Create a snapshot from that volume.

[stack@undercloud-0 ~]$ cinder snapshot-create a0d485d5-f893-43f5-8a40-e1e762482c11
+-------------+--------------------------------------+
| Property    | Value                                |
+-------------+--------------------------------------+
| created_at  | 2017-03-30T08:10:31.767236           |
| description | None                                 |
| id          | ffe07fae-ba40-48a5-b14c-3c5c51894ff2 |
| metadata    | {}                                   |
| name        | None                                 |
| size        | 1                                    |
| status      | creating                             |
| updated_at  | None                                 |
| volume_id   | a0d485d5-f893-43f5-8a40-e1e762482c11 |
+-------------+--------------------------------------+

3. Create a volume from that snapshot.

[stack@undercloud-0 ~]$ cinder create --snapshot-id ffe07fae-ba40-48a5-b14c-3c5c51894ff2
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2017-03-30T08:10:58.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | 7156d8fd-7434-48d4-a926-b64bef121f27 |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | None                                 |
| os-vol-host-attr:host          | hostgroup@tripleo_ceph#tripleo_ceph  |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 7f554817cae44d38a697954b360ed350     |
| replication_status             | disabled                             |
| size                           | 1                                    |
| snapshot_id                    | ffe07fae-ba40-48a5-b14c-3c5c51894ff2 |
| source_volid                   | None                                 |
| status                         | available                            |
| updated_at                     | 2017-03-30T08:10:59.000000           |
| user_id                        | 59007ad16aca4714888a74a3b63dde57     |
| volume_type                    | None                                 |
+--------------------------------+--------------------------------------+

[stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID                                   | Status    | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 7156d8fd-7434-48d4-a926-b64bef121f27 | available | -    | 1    | -           | false    |             |
| a0d485d5-f893-43f5-8a40-e1e762482c11 | available | -    | 1    | -           | false    |             |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+

[stack@undercloud-0 ~]$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+------+------+
| ID                                   | Volume ID                            | Status    | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------+------+
| ffe07fae-ba40-48a5-b14c-3c5c51894ff2 | a0d485d5-f893-43f5-8a40-e1e762482c11 | available | -    | 1    |
+--------------------------------------+--------------------------------------+-----------+------+------+

4. Try delete the volume with its associated snapshot.
 
[stack@undercloud-0 ~]$ cinder delete a0d485d5-f893-43f5-8a40-e1e762482c11 --cascade
Request to delete volume a0d485d5-f893-43f5-8a40-e1e762482c11 has been accepted.

[stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID                                   | Status    | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 7156d8fd-7434-48d4-a926-b64bef121f27 | available | -    | 1    | -           | false    |             |
| a0d485d5-f893-43f5-8a40-e1e762482c11 | available | -    | 1    | -           | false    |             |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+

[stack@undercloud-0 ~]$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+------+------+
| ID                                   | Volume ID                            | Status    | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------+------+
| ffe07fae-ba40-48a5-b14c-3c5c51894ff2 | a0d485d5-f893-43f5-8a40-e1e762482c11 | available | -    | 1    |
+--------------------------------------+--------------------------------------+-----------+------+------+

Actual results:
Failed to delete a volume with its associated snapshot when there is another volume from that snapshot.

Expected results:
Both volume and snapshot should be deleted when there is another volume from that snapshot.

Additional info:

from /cinder/volume.log:
2017-03-30 08:50:23.178 7901 ERROR cinder.volume.manager [req-4e083fa9-ce06-4881-8f0f-df06f9f3f267 59007ad16aca4714888a74a3b63dde57 7f554817cae44d38a697954b360ed350 - default default] Delete snapshot failed, due to snapshot busy.
2017-03-30 08:50:23.244 7901 ERROR cinder.volume.manager [req-4e083fa9-ce06-4881-8f0f-df06f9f3f267 59007ad16aca4714888a74a3b63dde57 7f554817cae44d38a697954b360ed350 - default default] Unable to delete busy volume.

Comment 4 Paul Grist 2019-10-08 21:52:31 UTC
*** Bug 1254470 has been marked as a duplicate of this bug. ***

Comment 6 Luigi Toscano 2020-11-04 09:26:27 UTC
I think this may be closed as duplicate of this feature: https://bugzilla.redhat.com/show_bug.cgi?id=1870282 (OSP13) or https://bugzilla.redhat.com/show_bug.cgi?id=1764324 (OSP16.1+)

Comment 7 Luigi Toscano 2021-04-01 09:30:21 UTC
This is not going to be fixed in OSP13, but it will be addressed in OSP16.2. I'm going to close this as duplicate of bug 1764324.

*** This bug has been marked as a duplicate of bug 1764324 ***


Note You need to log in before you can comment on or make changes to this bug.