From: Abhishek Lekshmanan Date: Mon, 11 Mar 2019 10:20:37 +0000 (+0100) Subject: rgw_admin: add a note warning stale instances for multisite X-Git-Tag: v14.2.1~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27602%2Fhead;p=ceph.git rgw_admin: add a note warning stale instances for multisite Signed-off-by: Abhishek Lekshmanan (cherry picked from commit 55fdcfa0432e2779b45246349d46e17d8b157153) --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 118d374325e0..655685f0af62 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -7855,6 +7855,13 @@ next: } if (opt_cmd == OPT_RESHARD_STALE_INSTANCES_LIST) { + if (!store->svc.zone->can_reshard() && !yes_i_really_mean_it) { + cerr << "Resharding disabled in a multisite env, stale instances unlikely from resharding" << std::endl; + cerr << "These instances may not be safe to delete." << std::endl; + cerr << "Use --yes-i-really-mean-it to force displaying these instances." << std::endl; + return EINVAL; + } + ret = RGWBucketAdminOp::list_stale_instances(store, bucket_op,f); if (ret < 0) { cerr << "ERROR: listing stale instances" << cpp_strerror(-ret) << std::endl;