From: Sage Weil Date: Fri, 18 May 2012 01:13:57 +0000 (-0700) Subject: mon: send join message if we are in monmap with blank addr X-Git-Tag: v0.48argonaut~137^2~13^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=434c158fa6bcf1ffab3b61340c8663b7a70d937e;p=ceph.git mon: send join message if we are in monmap with blank addr Being in the monmap with a blank ip is possible if we were a initial member seed but weren't part of the first election/quorum. If that's the case, first update ourselves before we try to call an election and join the quorum. Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index fa9c7c5229d7..81f43ce888df 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -748,11 +748,12 @@ void Monitor::handle_probe_reply(MMonProbe *m) } } if (ok) { - if (monmap->contains(name)) { + if (monmap->contains(name) && + !monmap->get_addr(name).is_blank_ip()) { // i'm part of the cluster; just initiate a new election start_election(); } else { - dout(10) << " ready to join, but i'm not in the monmap, trying to join" << dendl; + dout(10) << " ready to join, but i'm not in the monmap or my addr is blank, trying to join" << dendl; messenger->send_message(new MMonJoin(monmap->fsid, name, messenger->get_myaddr()), monmap->get_inst(*m->quorum.begin())); }