From: Dan Mick Date: Thu, 11 Jul 2013 00:25:32 +0000 (-0700) Subject: OSDMonitor: return failure for 'osd lost' without safety switch X-Git-Tag: v0.67-rc1~93 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=45dc57316aa7ce271006d4e45e1ab745d136bcc0;p=ceph.git OSDMonitor: return failure for 'osd lost' without safety switch If user doesn't supply --yes-i-really-mean-it, fail the operation Signed-off-by: Dan Mick --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index aaaf66183547..7e76ea271c40 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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 {