Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: rgw: add radosgw-admin bucket check olh/unlinked commands #53808

Merged
merged 8 commits into from Oct 20, 2023

Conversation

cfsnyder
Copy link
Contributor

@cfsnyder cfsnyder commented Oct 4, 2023

backport tracker: https://tracker.ceph.com/issues/62945


backport of #52576
parent tracker: https://tracker.ceph.com/issues/62075

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

Adds commands to radosgw-admin for checking for and fixing leftover
entries in the bucket index (and associated RADOS objects).

Fixes: https://tracker.ceph.com/issues/62075
Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 9b2042a)

Conflicts:
	src/rgw/driver/rados/rgw_bucket.cc
	src/rgw/driver/rados/rgw_bucket.h
	src/rgw/driver/rados/rgw_rados.cc
	src/rgw/rgw_admin.cc

Cherry-pick notes:
- conflicts due to rados files being moved into driver directory
- conflicts due to rename of rados classes
… bugs

Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit b79dcf6)
…k index

Fixes: https://tracker.ceph.com/issues/62760
Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 152aadb)

Conflicts:
	src/cls/rgw/cls_rgw.cc

Cherry-pick notes:
- Some function ordering changed
If a call to bucket_index_link_olh or bucket_index_unlink_instance
fails, its associated pending xattr may have prevented the olh object
from being removed by another thread. We should do a best effort
cleanup attempt for this case by calling update_olh before returning
an error to the caller.

Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 570adec)

Conflicts:
	src/rgw/driver/rados/rgw_rados.cc

Cherry-pick notes:
- Conflicts due to rgw_rados file being moved into driver dir in later versions
…--check-objects flag

Printing all index entries can be very time consuming for large
buckets and the inability to switch this behavior off makes it
cumbersome to use the command for fixing bucket stats. This was
also preventing the command from outputting recalculated bucket
stats when the --fix flag wasn't specified.

Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 6b057fe)

Conflicts:
	src/rgw/driver/rados/rgw_bucket.cc

Cherry-pick notes:
- Conflicts due to rgw_bucket.cc moved into driver dir in later versions
…bucket

Reproduces a regression where radosgw-admin bucket check incorrectly counts
objects that started as unversioned and later transitioned to versioned.

Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 340522f)
Fixes a regression with radosgw-admin bucket check stat
calculation and bucket reshard stat calculation when
there are objects that have transitioned from unversioned
to versioned. The bug was introduced in
152aadb.

Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 4728daa)
The bucket index check admin API was previously returning invalid
JSON.

Signed-off-by: Cory Snyder <csnyder@1111systems.com>
(cherry picked from commit 32fb6a1)
@cfsnyder cfsnyder added this to the pacific milestone Oct 4, 2023
@cfsnyder cfsnyder added the rgw label Oct 4, 2023
@github-actions github-actions bot added the tests label Oct 4, 2023
@cfsnyder cfsnyder requested a review from cbodley October 4, 2023 09:09
@yuriw yuriw merged commit e99bbbd into ceph:pacific Oct 20, 2023
8 checks passed
@batrick batrick modified the milestones: pacific, v16.2.15 Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants