]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: try reshard even if bucket is resharding 51836/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 1 Feb 2021 17:02:44 +0000 (12:02 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 30 May 2023 13:21:40 +0000 (09:21 -0400)
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 <cbodley@redhat.com>
(cherry picked from commit 122da8f14a1dae247a5f2f62a3a6e219a9c9de8f)

Conflicts:
src/rgw/rgw_admin.cc  no rgw::current_num_shards()

src/rgw/rgw_admin.cc

index 6f44b51d9b7e0cfd6a094b60f9777e7a3fa8abf6..0c0bd340555347fd1cfd3bd6788b6a1c11dedb82 100644 (file)
@@ -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) {