From bf1b88d9553ad0d0ba23b74ebcd0938b8d00b2e0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 1 Feb 2010 13:34:16 -0800 Subject: [PATCH] mon: fix osd tell * --- src/mon/OSDMonitor.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index f62b98bcdb2d7..187ff1b3aa4dd 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -946,9 +946,11 @@ bool OSDMonitor::preprocess_command(MMonCommand *m) m->cmd.erase(m->cmd.begin()); if (m->cmd[0] == "*") { m->cmd.erase(m->cmd.begin()); //and now we're done with the target num - for (int i = 0; i < osdmap.get_max_osd(); ++i) { - mon->send_command(osdmap.get_inst(i), m->cmd, paxos->get_version()); - } + for (int i = 0; i < osdmap.get_max_osd(); ++i) + if (osdmap.is_up(i)) + mon->send_command(osdmap.get_inst(i), m->cmd, paxos->get_version()); + r = 0; + ss << "ok"; } else { errno = 0; int who = strtol(m->cmd[0].c_str(), 0, 10); -- 2.39.5