]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: if we're the leader, don't validate command matching 925/head
authorGreg Farnum <greg@inktank.com>
Tue, 10 Dec 2013 19:33:51 +0000 (11:33 -0800)
committerGreg Farnum <greg@inktank.com>
Wed, 11 Dec 2013 18:12:56 +0000 (10:12 -0800)
Classic-format commands never match our leader command set!

Signed-off-by: Greg Farnum <greg@inktank.com>
src/mon/Monitor.cc

index 0afb8895aa3913ee58c49e3254d4bec2f40fb53c..4ac90a629b196619de9b4ee438ed147124854963 100644 (file)
@@ -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;