]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_admin: add a note warning stale instances for multisite 30340/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 11 Mar 2019 10:20:37 +0000 (11:20 +0100)
committerNathan Cutler <ncutler@suse.com>
Wed, 11 Sep 2019 13:23:42 +0000 (15:23 +0200)
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()"

src/rgw/rgw_admin.cc

index a8275d1b5236e2a4fce3be67b385bf0f497cc7eb..9db850ebb176c7451d1aff1fc876fa3809f4551e 100644 (file)
@@ -7971,6 +7971,13 @@ next:
  }
 
  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;