Bug 2270322

Summary: [RFE] QoLife improvements for "/usr/bin/rgw-restore-bucket-index" tool 6.1z6
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: J. Eric Ivancich <ivancich>
Component: RGWAssignee: J. Eric Ivancich <ivancich>
Status: CLOSED ERRATA QA Contact: Madhavi Kasturi <mkasturi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: ceph-eng-bugs, cephqe-warriors, rpollack, tserlin, vimishra
Target Milestone: ---Keywords: FutureFeature
Target Release: 6.1z7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-17.2.6-244 Doc Type: Enhancement
Doc Text:
.Improved temporary file placement and error messages for the with the ‘/usr/bin/rgw-restore-bucket-index' tool Previously, the ‘/usr/bin/rgw-restore-bucket-index' tool only placed temporary files into the ‘/tmp’ directory. This could lead to issues if the directory ran out of space, resulting in the following error messing being emitted: "ln: failed to access '/tmp/rgwrbi-object-list.XXX': No such file or directory". With this enhancement, users can now specify a specific directory to place temporary files, by using the ‘-t’ command-line option. Additionally, if the specified directory is full, users now receive an error message specifying the problem: “ERROR: the temporary directory's partition is full, preventing continuation”.
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-08-28 17:58:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description J. Eric Ivancich 2024-03-19 16:49:06 UTC
This bug was initially created as a copy of Bug #2267715

I am copying this bug because: 



Description of problem:
Based on the experience from the field the "/usr/bin/rgw-restore-bucket-index" tool stores temporary objects in /tmp directory, these objects consumes space based on the size of the bucket that is being recovered, for large buckets this can eventually lead to "/usr/bin/rgw-restore-bucket-index" tool failure due to running out of space, but the error message does not suggest that is the case, but rather fails with 
"ln: failed to access '/tmp/rgwrbi-object-list.XXX': No such file or directory"


With that information, would it make sense to consider 2 improvements of the "/usr/bin/rgw-restore-bucket-index" tool:
1. add option for custom path where the files will be stored
2. add detection of running out of space

Version-Release number of selected component (if applicable):
RHCS 5, 6, 7

How reproducible:
always

Steps to Reproduce:
1. have 4GB large /tmp
2. attempt to recover bucket with 17M objects


Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2024-03-19 16:49:14 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 2 J. Eric Ivancich 2024-03-19 16:50:39 UTC
Waiting for 6.1z5 to go out the door before cherry-picking two commits.

Comment 3 J. Eric Ivancich 2024-03-19 16:52:38 UTC
We need to pull the commits from 2 upstream PRs:

https://github.com/ceph/ceph/pull/55885
https://github.com/ceph/ceph/pull/56133

Comment 11 errata-xmlrpc 2024-08-28 17:58:51 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 (Red Hat Ceph Storage 6.1 security, bug fix, and enhancement updates.), 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/RHBA-2024:5960