Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
}
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;