.Repairing bucket indexes works as expected
Previously, the `cls` method of the Ceph Object Gateway that is used for repairing bucket indexes failed when its output result was too large. Consequently, affected bucket index objects could not be repaired using the `bucket check --fix` command, and the command failed with the "(90) Message too long" error. This update introduces a paging mechanism that ensures that bucket indexes can be repaired as expected.
Description of problem:
After failure when running bucket rm --purge-objects --bypass-gc --inconsistent-index. Trying to fix the bucket index resulted in (90) Message too long error from the OSD.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create a large bucket 300K objects
2. run bucket rm --purge-objects --bypass-gc --inconsistent-index and stop it in the middle creating a corrupted bucket index
3. try fixing the bucket index by running bucket check --fix
Actual results:
Error 90) Message too long
Expected results:
success
Additional info:
Using the attached script, 300K files were created in a bucket named foo.
'time radosgw-admin bucket rm --purge-objects --bypass-gc --inconsistent-index --bucket=foo' was run. This took about 90 minutes.
This process was repeated, and the rm operation was halted after 60 minutes.
radosgw-admin bucket check --fix ran to completion
repeated runs of halted rm operations showed that the number of objects decreased. Eventually, all files and the bucket were deleted.
At no time did the "Error 90) Message too long" error appear.
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, 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-2017:2903