Bug 1986684

Summary: [RBD] - rbd trash purge command not deleting images in trash
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Harish Munjulur <hmunjulu>
Component: RBDAssignee: Ilya Dryomov <idryomov>
Status: CLOSED ERRATA QA Contact: Chaithra <ckulal>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3CC: ceph-eng-bugs, ckulal, idryomov, kdreyer, tserlin
Target Milestone: ---Keywords: Automation
Target Release: 4.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-14.2.21-8.el8cp, ceph-14.2.21-8.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-05 07:53:24 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:

Description Harish Munjulur 2021-07-28 05:50:06 UTC
Description of problem: Rbd trash purge is not deleting images in rbdtrash 


Version-Release number of selected component (if applicable):
ceph version 14.2.21-5.el8cp (d28483a1292101da901e98abb008bc59817e7fca) nautilus (stable)

How reproducible: 3/3


Steps to Reproduce:
1.create an image 
2.create a snapshot for the image
3.move the images to trash 
4. purge the trash 

example:
1. #rbd create --image-format 2 --size 256 testimg1
2. #rbd create --image-format 2 --size 256 testimg3
3. #rbd create --image-format 2 --size 256 testimg2
4. #rbd snap create testimg1@snap
5. #rbd trash mv testimg1
6. #rbd trash mv testimg2
7. #rbd trash mv testimg3
8. #rbd trash purge

Actual results: Images are not deleted
[root@ceph ~]# rbd trash purge
Removing images: 0% complete...failed.

[root@ceph ~]# rbd trash ls
3ac3d9fe911b testimg1
3acfaae99e93 testimg2
3ad5bede1697 testimg3


Expected results:
[root@ceph-hary ~]# rbd trash purge
Removing images: 66% complete...failed.
rbd: some expired images could not be removed
Ensure that they are closed/unmapped, do not have snapshots (including trashed snapshots with linked clones), are not in a group and were moved to the trash successfully.

Comment 11 errata-xmlrpc 2022-05-05 07:53:24 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 (Moderate: Red Hat Ceph Storage 4.3 Security and Bug Fix update), 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/RHSA-2022:1716