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

radosgw-admin: allow 'bi purge' to delete index if entrypoint doesn't exist #43591

Merged
merged 2 commits into from Nov 3, 2021

Conversation

cbodley
Copy link
Contributor

@cbodley cbodley commented Oct 19, 2021

two separate fixes:

  • init_bucket() handling of bucket_id (applies to all radosgw-admin commands)
  • BI_PURGE handling of nonexistent 'cur_bucket'

Fixes: https://tracker.ceph.com/issues/52976

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@cbodley
Copy link
Contributor Author

cbodley commented Oct 19, 2021

when multisite is enabled, bucket deletion only deletes the bucket's entrypoint, preserving the bucket instance metadata and its index objects in case sync isn't finished

these deleted bucket instances show up in radosgw-admin reshard stale-instances list, and their manual cleanup requires radosgw-admin bi purge with --bucket-id to specify the correct instance (since the bucket entrypoint doesn't exist, --bucket alone can't find it)

@cbodley cbodley requested a review from ivancich October 19, 2021 17:33
@ljflores
Copy link
Contributor

jenkins test api

@@ -1149,7 +1149,7 @@ static int init_bucket(rgw::sal::User* user,
b.tenant = tenant_name;
b.name = bucket_name;
if (!bucket_id.empty()) {
b.bucket_id = bucket_name + ":" + bucket_id;
b.bucket_id = bucket_id;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a constructor for rgw_bucket that takes these 3 parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated

@cbodley
Copy link
Contributor Author

cbodley commented Oct 20, 2021

jenkins test api

we may get -ENOENT looking up cur_bucket here. we look up cur_bucket so
we can avoid purging the 'current' bucket instance. but if that
entrypoint doesn't exist, there is no current instance and that
shouldn't prevent us from purging

Fixes: https://tracker.ceph.com/issues/52976

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@ivancich
Copy link
Member

jenkins test api

1 similar comment
@ivancich
Copy link
Member

jenkins test api

@cbodley
Copy link
Contributor Author

cbodley commented Nov 3, 2021

@cbodley
Copy link
Contributor Author

cbodley commented Nov 3, 2021

jenkins test api

@cbodley cbodley merged commit 609ee39 into ceph:master Nov 3, 2021
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants