]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: try reshard even if bucket is resharding
authorCasey Bodley <cbodley@redhat.com>
Mon, 1 Feb 2021 17:02:44 +0000 (12:02 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 27 May 2022 19:47:32 +0000 (15:47 -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>
src/rgw/rgw_admin.cc

index ae12cc9a15f73ae3d461d980123165d5ebff1d57..b6460e13464a84f7d8938231e23f9aff6d7be227 100644 (file)
@@ -2928,13 +2928,6 @@ int check_reshard_bucket_params(rgw::sal::RadosStore* store,
     return ret;
   }
 
-  if ((*bucket)->get_info().layout.resharding != rgw::BucketReshardState::None) {
-    // 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 = rgw::current_num_shards((*bucket)->get_info().layout);
 
   if (num_shards <= num_source_shards && !yes_i_really_mean_it) {