Bug 1764324

Summary: Support for Cinder RBD Clone v2 - snapshot deletion
Product: Red Hat OpenStack Reporter: Jon Bernard <jobernar>
Component: openstack-cinderAssignee: Sofia Enriquez <senrique>
Status: CLOSED ERRATA QA Contact: Tzach Shefi <tshefi>
Severity: medium Docs Contact: RHOS Documentation Team <rhos-docs>
Priority: high    
Version: 16.0 (Train)CC: abishop, acanan, ahyder, amcleod, eharney, elicohen, gcharot, gfidente, jparker, jvisser, lkuchlan, ltoscano, nlevinki, nweinber, pgrist, senrique, shrjoshi, spower, yrabl
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-cinder-15.4.2-2.20210217050234.22eaeb5.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1968526 (view as bug list) Environment:
Last Closed: 2021-09-15 07:07:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1884322    
Bug Blocks: 1135132, 1570420, 1574364, 1968526, 1997715    

Description Jon Bernard 2019-10-22 18:43:41 UTC
The trash namespace works today for satisfying volume delete requests while storing the volume temporarily until all dependencies are removed.  For full deferred deletion support we must support both volumes and snapshots and an additional piece is required: using the v2 clone format for cloned volumes.  This will allow both volumes and snapshots to be moved to the trash and allow the rbd driver to accept delete requests when the final deletion will occur at a later time.

This will require a configuration change on the ceph cluster:

  'rbd default clone format = 2'

or setting the minimum client to mimic:

  $ ceph osd set-require-min-compat-client mimic

In a follow up patch, a background task to auto-flatten trash images to prevent this feature from consuming too many resources is planned.  This bug is meant to track the initial patch providing basic functionality to support asynchronous deletion of both volumes and snapshots.

Comment 1 Alan Bishop 2019-10-29 12:44:53 UTC
Jon, will this new rbd_default_clone_format need to be configurable by TripleO? How would upgrades work?

Comment 2 Jon Bernard 2019-10-30 16:44:15 UTC
(In reply to Alan Bishop from comment #1)
> Jon, will this new rbd_default_clone_format need to be configurable by
> TripleO? How would upgrades work?

Yes, until the default changes, TripleO will need to either update or deploy with this setting enabled.  I’m going to try to detect this in the driver and fall back gracefully if it’s available but not enabled.

Comment 4 Gregory Charot 2020-03-19 16:41:47 UTC
Still WIP and patch is relatively large, moving to 17.

Comment 8 Sofia Enriquez 2020-10-02 14:28:20 UTC
Greetings Greg,

- Logging: Notify the user if is using the V2 clone API or not:
https://review.opendev.org/#/c/754849/

- Driver cleanup: No need to land any of that in this BZ. 

- Others: Not directly related to this BZ but It fixes the original
ImageBusy error https://review.opendev.org/#/c/754397/ - We still need to
unprotect snapshot code for ^

Comment 10 Sofia Enriquez 2020-11-25 02:48:16 UTC
Regarding comment #8 no need to 'add support ' we only need to log information about it. Therefore, updating the case name.

Comment 15 Luigi Toscano 2021-02-16 21:38:38 UTC
Patch merged in stable/train.

Comment 29 Luigi Toscano 2021-04-01 09:30:21 UTC
*** Bug 1437392 has been marked as a duplicate of this bug. ***

Comment 30 Luigi Toscano 2021-04-01 09:48:21 UTC
*** Bug 1859370 has been marked as a duplicate of this bug. ***

Comment 31 Tzach Shefi 2021-05-26 09:13:55 UTC
Verified on:
openstack-cinder-15.5.1-2.20210419143704.1ec01f3.el8ost.1.noarch

Works as expected, passing automation and manual testing.

Comment 35 Luigi Toscano 2021-08-26 16:54:43 UTC
This feature is now about snapshot deletion only. The specific use case which involves volume deletion has been splitted out and it is tracked by bug 1997715.

Comment 38 errata-xmlrpc 2021-09-15 07:07:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483