From: Greg Farnum Date: Tue, 10 Dec 2013 19:33:51 +0000 (-0800) Subject: mon: if we're the leader, don't validate command matching X-Git-Tag: v0.75~125^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb47d54044a6e77c0f371e10186ea6566458d4db;p=ceph.git mon: if we're the leader, don't validate command matching Classic-format commands never match our leader command set! Signed-off-by: Greg Farnum --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 0afb8895aa3..4ac90a629b1 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2080,8 +2080,8 @@ void Monitor::handle_command(MMonCommand *m) // validate command is in our map & matches, or forward const MonCommand *mon_cmd = _get_moncommand(prefix, mon_commands, ARRAY_SIZE(mon_commands)); - if (!mon_cmd || - (*leader_cmd != *mon_cmd)) { + if (!is_leader() && (!mon_cmd || + (*leader_cmd != *mon_cmd))) { dout(10) << "We don't match leader, forwarding request " << m << dendl; forward_request_leader(m); return;