From: Orit Wasserman Date: Thu, 29 Mar 2018 10:57:28 +0000 (+0300) Subject: rgw: warn user about on going resharding when canceling it X-Git-Tag: v13.1.0~339^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21120%2Fhead;p=ceph.git rgw: warn user about on going resharding when canceling it Fixes: http://tracker.ceph.com/issues/21619 Signed-off-by: Orit Wasserman --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index e9dc04d29f18..b88a8fee104f 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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;