From fc447bd42ad3618db1ce380abfc9fb1886ae8702 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 17 May 2012 17:50:49 -0700 Subject: [PATCH] mon: add peers probing us to extra peer list If we are probed by another monitor, add them to our extra probe list. This lets us rely on the active probe/reply to gather information and not infer anything from here. Signed-off-by: Sage Weil --- src/mon/Monitor.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index a643533aa02ac..6ac23f8f9fa9d 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -649,6 +649,13 @@ void Monitor::handle_probe_probe(MMonProbe *m) for (vector::iterator p = paxos.begin(); p != paxos.end(); ++p) r->paxos_versions[(*p)->get_machine_name()] = (*p)->get_version(); messenger->send_message(r, m->get_connection()); + + // did we discover a peer here? + if (!monmap->contains(m->get_source_addr())) { + dout(1) << " adding peer " << m->get_source_addr() << " to list of hints" << dendl; + extra_probe_peers.insert(m->get_source_addr()); + } + m->put(); } -- 2.39.5