]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: route manager reports down to the MgrMon
authorGreg Farnum <gfarnum@redhat.com>
Sat, 11 Mar 2017 02:25:13 +0000 (18:25 -0800)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 16:58:15 +0000 (12:58 -0400)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/mon/MgrMonitor.cc
src/mon/MgrMonitor.h
src/mon/Monitor.cc

index fb9fa7ca9772cf57d48085ab3435a12e44a7c519..77324fb9a974a896c2e41ea353f5674392160d4b 100644 (file)
@@ -14,6 +14,7 @@
 #include "messages/MMgrBeacon.h"
 #include "messages/MMgrMap.h"
 #include "messages/MMgrDigest.h"
+#include "messages/MMonMgrReport.h"
 
 #include "PGMap.h"
 #include "PGMonitor.h"
@@ -107,6 +108,8 @@ bool MgrMonitor::preprocess_query(MonOpRequestRef op)
       return preprocess_beacon(op);
     case MSG_MON_COMMAND:
       return preprocess_command(op);
+    case MSG_MON_MGR_REPORT:
+      return preprocess_report(op);
     default:
       mon->no_reply(op);
       derr << "Unhandled message type " << m->get_type() << dendl;
@@ -124,6 +127,9 @@ bool MgrMonitor::prepare_update(MonOpRequestRef op)
     case MSG_MON_COMMAND:
       return prepare_command(op);
 
+    case MSG_MON_MGR_REPORT:
+      return prepare_report(op);
+
     default:
       mon->no_reply(op);
       derr << "Unhandled message type " << m->get_type() << dendl;
@@ -239,6 +245,14 @@ bool MgrMonitor::prepare_beacon(MonOpRequestRef op)
   return updated;
 }
 
+bool MgrMonitor::preprocess_report(MonOpRequestRef op) { return false; }
+
+bool MgrMonitor::prepare_report(MonOpRequestRef op)
+{
+  MMonMgrReport *m = static_cast<MMonMgrReport*>(op->get_req());
+  return true;
+}
+
 void MgrMonitor::check_subs()
 {
   const std::string type = "mgrmap";
index af3c1aeaffc06b9edd0a53ca37500ec86a909353..d45d853ceb56904d12d32b9fd1ff4a15432ed16f 100644 (file)
@@ -69,6 +69,9 @@ public:
   bool preprocess_beacon(MonOpRequestRef op);
   bool prepare_beacon(MonOpRequestRef op);
 
+  bool preprocess_report(MonOpRequestRef op);
+  bool prepare_report(MonOpRequestRef op);
+
   void check_sub(Subscription *sub);
   void check_subs();
   void send_digests();
index d4b4f87133ec94d64a35943101ef0fe86faef6da..560ca7acc2c00df310dc08aabe91e888f5578cdd 100644 (file)
@@ -3831,6 +3831,7 @@ void Monitor::dispatch_op(MonOpRequestRef op)
 
     // Mgrs
     case MSG_MGR_BEACON:
+    case MSG_MON_MGR_REPORT:
       paxos_service[PAXOS_MGR]->dispatch(op);
       break;