]> 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)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 13 Sep 2021 16:27:50 +0000 (12:27 -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 be3369aa49b2f536786fb9ced8350de6fd3e384d..76badaab3af50db9846afde76e6260be0db2b0b8 100644 (file)
@@ -2722,13 +2722,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) {