From 39bd83d63bc7403ef505747eca66dc481f58132e Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 10 Mar 2017 18:25:13 -0800 Subject: [PATCH] mon: route manager reports down to the MgrMon Signed-off-by: Greg Farnum --- src/mon/MgrMonitor.cc | 14 ++++++++++++++ src/mon/MgrMonitor.h | 3 +++ src/mon/Monitor.cc | 1 + 3 files changed, 18 insertions(+) diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index fb9fa7ca977..77324fb9a97 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -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(op->get_req()); + return true; +} + void MgrMonitor::check_subs() { const std::string type = "mgrmap"; diff --git a/src/mon/MgrMonitor.h b/src/mon/MgrMonitor.h index af3c1aeaffc..d45d853ceb5 100644 --- a/src/mon/MgrMonitor.h +++ b/src/mon/MgrMonitor.h @@ -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(); diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index d4b4f87133e..560ca7acc2c 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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; -- 2.47.3