]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: return failure for 'osd lost' without safety switch
authorDan Mick <dan.mick@inktank.com>
Thu, 11 Jul 2013 00:25:32 +0000 (17:25 -0700)
committerDan Mick <dan.mick@inktank.com>
Thu, 11 Jul 2013 03:58:51 +0000 (20:58 -0700)
If user doesn't supply --yes-i-really-mean-it, fail the operation

Signed-off-by: Dan Mick <dan.mick@inktank.com>
src/mon/OSDMonitor.cc

index aaaf66183547e91732c023f63464b7eb49a1db02..7e76ea271c40dd95f8c8ff546d5ed5d2545a4f9d 100644 (file)
@@ -3163,6 +3163,8 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
     if (!cmd_getval(g_ceph_context, cmdmap, "sure", sure) || sure != "--yes-i-really-mean-it") {
       ss << "are you SURE?  this might mean real, permanent data loss.  pass "
            "--yes-i-really-mean-it if you really do.";
+      err = -EPERM;
+      goto reply;
     } else if (!osdmap.exists(id) || !osdmap.is_down(id)) {
       ss << "osd." << id << " is not down or doesn't exist";
     } else {