]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Move incarnations for v2 subvolumes, to subvolume trash
authorShyamsundar Ranganathan <srangana@redhat.com>
Sun, 23 Aug 2020 16:31:01 +0000 (12:31 -0400)
committerShyamsundar Ranganathan <srangana@redhat.com>
Thu, 28 Jan 2021 15:16:39 +0000 (10:16 -0500)
commit1db5a116eb44345378ac7d5965dd8f6b56f2ab2c
treeeabf3421d88bdf16f68e178e5af50ffb9fe58d79
parent59985b9dd708cb742e20de54704956fbefe5f10c
mgr/volumes: Move incarnations for v2 subvolumes, to subvolume trash

For v2 subvolumes without any snapshots or pending purges
move the subvolume to trash, for the purge operation.

When removing only incarnations, leverage symlink based purge
job creation, to avoid renaming the incarnation out of the
subvolume.

For create errors, where the subvolume was retained, just remove
the created incarnation directory.

Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 20c8a62939a0f290234ffa048bcc4c36f033b440)
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