]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: prevent restored trash images from being deleted after delay 30828/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 11 Sep 2019 20:30:16 +0000 (16:30 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 10 Oct 2019 00:19:36 +0000 (20:19 -0400)
commitd202faded6223d993d7f8c3d3f4f15e278a197a1
tree677a9832f4838c1fb7fb097ea213498f866695fc
parent6de38f2dab9e28e2f0efc631be359b639583af28
rbd-mirror: prevent restored trash images from being deleted after delay

The image deleter wasn't verifying whether or not an image was still in the trash
prior to deleting the image. This not only would incorrectly remove any restored
images but it will also leave the image id object and entry within the directory.

Fixes: https://tracker.ceph.com/issues/41780
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f091a31d5252bba76598fffdc997275ca531621d)

Conflicts:
src/test/rbd_mirror/image_deleter/test_mock_TrashRemoveRequest.cc: removed state test cases
src/tools/rbd_mirror/image_deleter/TrashRemoveRequest.h/cc: removed state validation
src/test/rbd_mirror/image_deleter/test_mock_TrashRemoveRequest.cc
src/tools/rbd_mirror/image_deleter/TrashRemoveRequest.cc
src/tools/rbd_mirror/image_deleter/TrashRemoveRequest.h