]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: send join message if we are in monmap with blank addr
authorSage Weil <sage@inktank.com>
Fri, 18 May 2012 01:13:57 +0000 (18:13 -0700)
committerSage Weil <sage@inktank.com>
Fri, 18 May 2012 23:23:58 +0000 (16:23 -0700)
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 <sage@inktank.com>
src/mon/Monitor.cc

index fa9c7c5229d7c3c8af9bc02695d3a14f62cd3d8c..81f43ce888df610071ae6ce0e7a48e4fae748bb2 100644 (file)
@@ -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()));
       }