summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-16 16:26:57 -0700
committerSage Weil <sage@inktank.com>2013-07-16 16:26:57 -0700
commitd45429b81ab9817284d6dca98077cb77b5e8280f (patch)
treebc7eef077c61e47c0316656ce704ddc7d726cf60
parent9c4a0307db9ff876dffb0757e796f586c8aa447a (diff)
downloadceph-d45429b81ab9817284d6dca98077cb77b5e8280f.tar.gz
mon/MDSMonitor: make 'mds cluster_{up,down}' idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/mon/MDSMonitor.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc
index 811cdf03b7f..172f0f1e3db 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);