From: Sage Weil Date: Fri, 18 May 2012 00:50:49 +0000 (-0700) Subject: mon: add peers probing us to extra peer list X-Git-Tag: v0.48argonaut~137^2~13^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc447bd42ad3618db1ce380abfc9fb1886ae8702;p=ceph.git 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 --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index a643533aa02a..6ac23f8f9fa9 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(); }