]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: warn user about on going resharding when canceling it 21120/head
authorOrit Wasserman <owasserm@redhat.com>
Thu, 29 Mar 2018 10:57:28 +0000 (13:57 +0300)
committerOrit Wasserman <owasserm@redhat.com>
Tue, 10 Apr 2018 10:57:58 +0000 (13:57 +0300)
Fixes: http://tracker.ceph.com/issues/21619
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_admin.cc

index e9dc04d29f18b4e8976d2049d683f8d0bde5f0c1..b88a8fee104fe1821cc12b939429161ed88421d9 100644 (file)
@@ -5867,11 +5867,15 @@ next:
     RGWBucketReshard br(store, bucket_info, attrs);
     int ret = br.cancel();
     if (ret < 0) {
-      cerr << "Error canceling bucket " << bucket_name << " resharding: " << cpp_strerror(-ret) <<
-       std::endl;
+      if (ret == -EBUSY) {
+       cerr << "There is ongoing resharding, please retry after " << g_conf->rgw_reshard_bucket_lock_duration <<
+            " seconds " << std::endl;
+      } else {
+       cerr << "Error canceling bucket " << bucket_name << " resharding: " << cpp_strerror(-ret) <<
+         std::endl;
+      }
       return ret;
     }
-
     RGWReshard reshard(store);
 
     cls_rgw_reshard_entry entry;