The election and some other stuff depend on msg->get_source().num() to get
the peer rank, and that is part of the connection state. If it changes,
we need to close old connections and open new ones so that we aren't
taken for someone else (like mon.-1).
Signed-off-by: Sage Weil <sage@newdream.net>
dout(0) << " my rank is now " << newrank << " (was " << rank << ")" << dendl;
messenger->set_myname(entity_name_t::MON(newrank));
rank = newrank;
+
+ // reset all connections, or else our peers will think we are someone else.
+ messenger->mark_down_all();
}
// reset