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: v15.0.0~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55fdcfa0432e2779b45246349d46e17d8b157153;p=ceph.git rgw_admin: add a note warning stale instances for multisite Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 5f2a1faebe03..f4d67aed0fb3 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -7836,6 +7836,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;