From 55fdcfa0432e2779b45246349d46e17d8b157153 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 --- 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 5f2a1faebe03a..f4d67aed0fb3c 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; -- 2.39.5