]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: don't require 'sure' flag for new fs
authorJohn Spray <john.spray@inktank.com>
Tue, 29 Apr 2014 15:01:52 +0000 (16:01 +0100)
committerJohn Spray <jspray@redhat.com>
Mon, 30 Jun 2014 09:30:43 +0000 (10:30 +0100)
Only prompt for --yes-i-really-mean-it if there
is an existing FS.

Signed-off-by: John Spray <john.spray@inktank.com>
src/mon/MDSMonitor.cc

index f225197288ccb8b3a98b2747f8ce3468ff5fd752..2b5e8ac79ca36445c457f29dbdcd4241a1ab6a5d 100644 (file)
@@ -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 {