From: Orit Wasserman Date: Wed, 23 Aug 2017 09:13:24 +0000 (+0300) Subject: rgw-admin: require --yes-i-really-mean-it when using --inconsistent_index X-Git-Tag: v12.2.1~39^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cac29c9618fc5ca8bfcc6a5b4b83ff51443654fa;p=ceph.git rgw-admin: require --yes-i-really-mean-it when using --inconsistent_index Signed-off-by: Orit Wasserman Fixes: http://tracker.ceph.com/issues/20777 (cherry picked from commit 1cd7ef0eb9bde5a08f8c758ce57c9e298fabad8d) --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index fb820e6384d..915a9194499 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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); } }