]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: maintain per subvolume trash directory
authorVenky Shankar <vshankar@redhat.com>
Fri, 21 Aug 2020 14:07:37 +0000 (10:07 -0400)
committerShyamsundar Ranganathan <srangana@redhat.com>
Thu, 28 Jan 2021 15:16:27 +0000 (10:16 -0500)
commit59985b9dd708cb742e20de54704956fbefe5f10c
tree3b9aeea3c85c659a986a5aa81fca0ead799eb975
parentb744bfd0e0789555f441e34422c8e397a29ad27a
mgr/volumes: maintain per subvolume trash directory

PR https://github.com/ceph/ceph/pull/36472 introduces changes
that disallow nested nested snapshots in a subtree (subvolume)
and renames across subvolumes. This effect asynchronous purge
in mgr/volumes as subvolume are moved to a trash directory for
asynchronous deletion by purge threads.

To workaround this, start maintaining a subvolume specific
trash directory. Use the trash directory as an index to the
subvolume specific trash directory entry.

This changes subvolume deletion logic which currently relies
on `--retain-snapshots` flag to decide if the subvolume user
directory should get purged or the subvolume base directory
itself. Deleting a subvolume moves the user facing directory
to its specific trash directory. Purge threads take care of
deleting user facing directories (in trash) and the subvolume
base directory if required (when certain conditions are met).

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit aae7a70ed2cf9c32684cfdaf701778a05f229e09)
src/pybind/mgr/volumes/fs/operations/resolver.py
src/pybind/mgr/volumes/fs/operations/trash.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py
src/pybind/mgr/volumes/fs/purge_queue.py