From 329d99979adac614501ebdca28b7a2a6ee6cd5db Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 1 Feb 2021 12:02:44 -0500 Subject: [PATCH] radosgw-admin: try reshard even if bucket is resharding allow reshard in case a previous reshard failed. if the reshard is actually still in progress, we'll fail to get the reshard lock Signed-off-by: Casey Bodley (cherry picked from commit 122da8f14a1dae247a5f2f62a3a6e219a9c9de8f) Conflicts: src/rgw/rgw_admin.cc no rgw::current_num_shards() --- src/rgw/rgw_admin.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 6f44b51d9b7e0..0c0bd34055534 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2736,13 +2736,6 @@ int check_reshard_bucket_params(rgw::sal::RGWRadosStore *store, return ret; } - if (bucket_info.reshard_status != cls_rgw_reshard_status::NOT_RESHARDING) { - // if in_progress or done then we have an old BucketInfo - cerr << "ERROR: the bucket is currently undergoing resharding and " - "cannot be added to the reshard list at this time" << std::endl; - return -EBUSY; - } - int num_source_shards = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? bucket_info.layout.current_index.layout.normal.num_shards : 1); if (num_shards <= num_source_shards && !yes_i_really_mean_it) { -- 2.39.5