Only take our absence from the monmap to mean that we were removed if we
were ever a member in the first places.
This fixes the bootstrap case:
- create temp_monmap with existing member(s) plus new guy
- ceph-mon --mkfs --monmap temp_monmap --fsid ...
- start ceph-mon
Basically, this is just using the seed monmap as a way to tell the new
daemon which ip:port to use. Specifying mon addr, public network, or
public addr would also work.
Fixes: #2436
Signed-off-by: Sage Weil <sage@inktank.com>
// note my rank
int newrank = monmap->get_rank(messenger->get_myaddr());
if (newrank < 0 && rank >= 0) {
- dout(0) << " removed from monmap, suicide." << dendl;
- exit(0);
+ // was i ever part of the quorum?
+ if (store->exists_bl_ss("joined")) {
+ dout(0) << " removed from monmap, suicide." << dendl;
+ exit(0);
+ }
}
if (newrank != rank) {
dout(0) << " my rank is now " << newrank << " (was " << rank << ")" << dendl;
resend_routed_requests();
update_logger();
register_cluster_logger();
+
+ // make note of the fact that i was, once, part of the quorum.
+ store->put_int(1, "joined");
}