mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
monc: resubscribe on monitor connection reset
This commit is contained in:
parent
cdf683ca45
commit
a0cc21dc66
@ -76,7 +76,7 @@ int main(int argc, const char **argv, const char *envp[]) {
|
||||
|
||||
rank.start();
|
||||
|
||||
rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossy_fast_fail());
|
||||
rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossless());
|
||||
rank.set_policy(entity_name_t::TYPE_MDS, SimpleMessenger::Policy::lossless());
|
||||
rank.set_policy(entity_name_t::TYPE_OSD, SimpleMessenger::Policy::lossless());
|
||||
|
||||
|
@ -59,7 +59,7 @@ int main(int argc, const char **argv, char *envp[])
|
||||
rank.bind();
|
||||
cout << "starting csyn at " << rank.get_rank_addr() << std::endl;
|
||||
|
||||
rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossy_fast_fail());
|
||||
rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossless());
|
||||
rank.set_policy(entity_name_t::TYPE_MDS, SimpleMessenger::Policy::lossless());
|
||||
rank.set_policy(entity_name_t::TYPE_OSD, SimpleMessenger::Policy::lossless());
|
||||
|
||||
|
@ -247,6 +247,7 @@ void MonClient::handle_mount_ack(MClientMountAck* m)
|
||||
bufferlist::iterator p = m->monmap_bl.begin();
|
||||
::decode(monmap, p);
|
||||
|
||||
messenger->_set_myaddr(m->addr);
|
||||
messenger->reset_myname(entity_name_t::CLIENT(m->client));
|
||||
|
||||
// finish.
|
||||
@ -279,9 +280,9 @@ void MonClient::pick_new_mon()
|
||||
}
|
||||
|
||||
|
||||
void MonClient::ms_handle_reset(const entity_addr_t& peer)
|
||||
void MonClient::ms_handle_remote_reset(const entity_addr_t& peer)
|
||||
{
|
||||
dout(10) << "ms_handle_reset " << peer << dendl;
|
||||
dout(10) << "ms_handle_peer_reset " << peer << dendl;
|
||||
pick_new_mon();
|
||||
renew_subs();
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ private:
|
||||
bool ms_dispatch(Message *m);
|
||||
void handle_monmap(MMonMap *m);
|
||||
|
||||
void ms_handle_reset(const entity_addr_t& peer);
|
||||
void ms_handle_remote_reset(const entity_addr_t& peer);
|
||||
|
||||
protected:
|
||||
class C_MountTimeout : public Context {
|
||||
|
Loading…
Reference in New Issue
Block a user