Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit
55fdcfa0432e2779b45246349d46e17d8b157153)
Conflicts:
src/rgw/rgw_admin.cc
- "store->svc.zone" is a nautilus addition: use "store->can_reshard()"
}
if (opt_cmd == OPT_RESHARD_STALE_INSTANCES_LIST) {
+ if (!store->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;