summaryrefslogtreecommitdiffstats
path: root/src/mgr/DaemonServer.cc
diff options
context:
space:
mode:
authorcfanz <songxinying@sensetime.com>2018-12-30 04:49:58 +0100
committerXinying Song <songxinying@sensetime.com>2019-01-15 11:51:35 +0100
commit430ba5e231d6929a004a9758d31b426ecbe43951 (patch)
tree42e89d3b649de8ed97cc9b7487ba7380e00cf574 /src/mgr/DaemonServer.cc
parentMerge pull request #25702 from wjwithagen/wjw-fix-bluestore-warning (diff)
downloadceph-430ba5e231d6929a004a9758d31b426ecbe43951.tar.xz
ceph-430ba5e231d6929a004a9758d31b426ecbe43951.zip
mgr: request mon metadata when receiving a report msg from an unknown monitor
* Mgr needs to issue an metadata request when receiving a report message from a monitor who hasn't been in the mgr's daemon_state. Otherwise the connection between mgr and monitor cannot be established. Fixes: http://tracker.ceph.com/issues/37753 Signed-off-by: Xinying Song <songxinying@sensetime.com>
Diffstat (limited to 'src/mgr/DaemonServer.cc')
-rw-r--r--src/mgr/DaemonServer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc
index d4e5f802114..bde92a37907 100644
--- a/src/mgr/DaemonServer.cc
+++ b/src/mgr/DaemonServer.cc
@@ -553,7 +553,7 @@ bool DaemonServer::handle_report(MMgrReport *m)
// issue metadata request in background
if (!daemon_state.is_updating(key) &&
- (key.first == "osd" || key.first == "mds")) {
+ (key.first == "osd" || key.first == "mds" || key.first == "mon")) {
std::ostringstream oss;
auto c = new MetadataUpdate(daemon_state, key);
@@ -566,6 +566,9 @@ bool DaemonServer::handle_report(MMgrReport *m)
oss << "{\"prefix\": \"mds metadata\", \"who\": \""
<< key.second << "\"}";
+ } else if (key.first == "mon") {
+ oss << "{\"prefix\": \"mon metadata\", \"id\": \""
+ << key.second << "\"}";
} else {
ceph_abort();
}