summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Eduardo Luís <joao.luis@inktank.com>2013-08-28 10:08:31 -0700
committerJoão Eduardo Luís <joao.luis@inktank.com>2013-08-28 10:08:31 -0700
commitf271a73ca56a6328fd93b3a488f6ee2883bdc0e8 (patch)
treea913aad81cfdf78d4b65ac85468910e518c7759d
parentbe9a39b766ba825ef348ca6e2de1f4db7c091dff (diff)
parentc24028570015cacf1d9e154ffad80bec06a61e7c (diff)
downloadceph-f271a73ca56a6328fd93b3a488f6ee2883bdc0e8.tar.gz
Merge pull request #552 from ceph/wip-4924-master
mon: discover mon addrs, names during election state too Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r--src/mon/Monitor.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 45ca02027fc..10f5bfb149c 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -1292,7 +1292,8 @@ void Monitor::handle_probe_reply(MMonProbe *m)
dout(10) << "handle_probe_reply " << m->get_source_inst() << *m << dendl;
dout(10) << " monmap is " << *monmap << dendl;
- if (!is_probing()) {
+ // discover name and addrs during probing or electing states.
+ if (!is_probing() && !is_electing()) {
m->put();
return;
}
@@ -1326,6 +1327,12 @@ void Monitor::handle_probe_reply(MMonProbe *m)
<< peer_name << " -> " << m->name << " in my monmap"
<< dendl;
monmap->rename(peer_name, m->name);
+
+ if (is_electing()) {
+ m->put();
+ bootstrap();
+ return;
+ }
} else {
dout(10) << " peer name is " << peer_name << dendl;
}
@@ -1342,6 +1349,12 @@ void Monitor::handle_probe_reply(MMonProbe *m)
}
}
+ // end discover phase
+ if (!is_probing()) {
+ m->put();
+ return;
+ }
+
assert(paxos != NULL);
if (is_synchronizing()) {