From 89eb2e47ad947cfb496cfd4a801d86f30b8fca94 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Mon, 11 Mar 2019 11:20:37 +0100 Subject: [PATCH] rgw_admin: add a note warning stale instances for multisite Signed-off-by: Abhishek Lekshmanan (cherry picked from commit 55fdcfa0432e2779b45246349d46e17d8b157153) --- src/rgw/rgw_admin.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 118d374325e0d..655685f0af621 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; -- 2.39.5