]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw_admin: add a note warning stale instances for multisite
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 11 Mar 2019 10:20:37 +0000 (11:20 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 11 Mar 2019 14:31:43 +0000 (15:31 +0100)
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_admin.cc

index 5f2a1faebe03a00ebc7d22b80a55493f94903243..f4d67aed0fb3cf7f6db0a629673bc745b442c79f 100644 (file)
@@ -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;