From 243963c1225239d9f80e27921bc53ecf24b0c20b Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 29 Apr 2014 16:01:52 +0100 Subject: [PATCH] mon: don't require 'sure' flag for new fs Only prompt for --yes-i-really-mean-it if there is an existing FS. Signed-off-by: John Spray --- src/mon/MDSMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index f225197288ccb..2b5e8ac79ca36 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -1154,7 +1154,7 @@ bool MDSMonitor::prepare_command(MMonCommand *m) string sure; cmd_getval(g_ceph_context, cmdmap, "sure", sure); - if (sure != "--yes-i-really-mean-it") { + if (pending_mdsmap.enabled && sure != "--yes-i-really-mean-it") { ss << "this is DANGEROUS and will wipe out the mdsmap's fs, and may clobber data in the new pools you specify. add --yes-i-really-mean-it if you do."; r = -EPERM; } else { -- 2.39.5