From: Sage Weil Date: Tue, 16 Jul 2013 23:26:57 +0000 (-0700) Subject: mon/MDSMonitor: make 'mds cluster_{up,down}' idempotent X-Git-Tag: v0.67-rc1~51 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d45429b81ab9817284d6dca98077cb77b5e8280f;p=ceph.git mon/MDSMonitor: make 'mds cluster_{up,down}' idempotent Signed-off-by: Sage Weil --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 811cdf03b7ff..172f0f1e3dbe 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -886,23 +886,19 @@ bool MDSMonitor::prepare_command(MMonCommand *m) } else if (prefix == "mds cluster_down") { if (pending_mdsmap.test_flag(CEPH_MDSMAP_DOWN)) { ss << "mdsmap already marked DOWN"; - r = -EPERM; } else { pending_mdsmap.set_flag(CEPH_MDSMAP_DOWN); ss << "marked mdsmap DOWN"; - r = 0; } - + r = 0; } else if (prefix == "mds cluster_up") { if (pending_mdsmap.test_flag(CEPH_MDSMAP_DOWN)) { pending_mdsmap.clear_flag(CEPH_MDSMAP_DOWN); ss << "unmarked mdsmap DOWN"; - r = 0; } else { ss << "mdsmap not marked DOWN"; - r = -EPERM; } - + r = 0; } else if (prefix == "mds compat rm_compat") { int64_t f; cmd_getval(g_ceph_context, cmdmap, "feature", f);