]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_admin: add a note warning stale instances for multisite 27602/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 11 Mar 2019 10:20:37 +0000 (11:20 +0100)
committerPrashant D <pdhange@redhat.com>
Tue, 16 Apr 2019 02:11:24 +0000 (22:11 -0400)
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 55fdcfa0432e2779b45246349d46e17d8b157153)

src/rgw/rgw_admin.cc

index 118d374325e0d7edad4be97527a5304ccf39efb9..655685f0af6211841f6aa0f628bc5b37b2195e62 100644 (file)
@@ -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;