]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw-admin: require --yes-i-really-mean-it when using --inconsistent_index 17488/head
authorOrit Wasserman <owasserm@redhat.com>
Wed, 23 Aug 2017 09:13:24 +0000 (12:13 +0300)
committerNathan Cutler <ncutler@suse.com>
Tue, 5 Sep 2017 10:09:03 +0000 (12:09 +0200)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Fixes: http://tracker.ceph.com/issues/20777
(cherry picked from commit 1cd7ef0eb9bde5a08f8c758ce57c9e298fabad8d)

src/rgw/rgw_admin.cc

index fb820e6384d06c044271d3dc131af8f5ae9e1657..915a91944995a5a35e2113f2418bcfa8edb588da 100644 (file)
@@ -5852,6 +5852,11 @@ next:
     if (inconsistent_index == false) {
       RGWBucketAdminOp::remove_bucket(store, bucket_op, bypass_gc, true);
     } else {
+      if (!yes_i_really_mean_it) {
+       cerr << "using --inconsistent_index can corrupt the bucket index " << std::endl
+       << "do you really mean it? (requires --yes-i-really-mean-it)" << std::endl;
+       return 1;
+      }
       RGWBucketAdminOp::remove_bucket(store, bucket_op, bypass_gc, false);
     }
   }