]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: warn user about on going resharding when canceling it 21389/head
authorOrit Wasserman <owasserm@redhat.com>
Thu, 29 Mar 2018 10:57:28 +0000 (13:57 +0300)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 12 Apr 2018 17:32:46 +0000 (19:32 +0200)
Fixes: http://tracker.ceph.com/issues/21619
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit f4dae60d4cc1ae4099c8d5da785f32a7c39f5a79)

src/rgw/rgw_admin.cc

index 9fb36395e68b07b676b94a2a7de2db9b786b1082..5b195bc84aa48ffada4f2463fd665177bf2373c1 100644 (file)
@@ -5784,11 +5784,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;