Project

General

Profile

Bug #25346

should not be allowed to restore an image when it is being deleted

Added by wb song about 1 year ago. Updated 12 months ago.

Status:
Need Review
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/02/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

An image that is being deleted in trash bin should not be allowed to be restored.
Steps to re-produce:
Client-A:

[root@ /clove/swb/ceph/build]# rbd du img1
NAME   PROVISIONED USED
img1       100 GiB 7.8 GiB
[root@ /clove/swb/ceph/build]# rbd trash mv img1
[root@ /clove/swb/ceph/build]# rbd trash ls
10866b8b4567 img1
[root@ /clove/swb/ceph/build]# rbd trash rm 10866b8b4567    # doing restore operation at Client-B before the delete operation completes
Removing image: 100% complete...done.

Client-B:

[root@ /clove/swb/ceph/build]# rbd trash restore 10866b8b4567
[root@ /clove/swb/ceph/build]# rbd info img1
2018-07-30 15:47:14.754 7f6e6dffb700 -1 librbd::image::OpenRequest: failed to retrieve initial metadata: (2) No such file or directory
rbd: error opening image img1: (2) No such file or directory

History

#2 Updated by Mykola Golub 12 months ago

  • Status changed from New to Need Review

Also available in: Atom PDF