From 77c780df54a8151195c34241c7858e0063d0edf4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Aug 2011 16:06:22 -0700 Subject: [PATCH] osd: fix heartbeats after bad markdown The heartbeat start message comes from hbin messenger, which has no port and a nonce of the pid (at startup). When we mark ourselves down/up, and then resend a start, the peer will send a RESETSESSION and the stat message will get lost, and then we'll miss heartbeats. Mark down all connections, so that when we reconnect, our start message is not lost. Signed-off-by: Sage Weil --- src/msg/Messenger.h | 1 + src/osd/OSD.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/msg/Messenger.h b/src/msg/Messenger.h index b5612fe8589d7..6b9d82aad3c73 100644 --- a/src/msg/Messenger.h +++ b/src/msg/Messenger.h @@ -165,6 +165,7 @@ protected: virtual void mark_down(Connection *con) = 0; virtual void mark_down_on_empty(Connection *con) = 0; virtual void mark_disposable(Connection *con) = 0; + virtual void mark_down_all() = 0; virtual Connection *get_connection(const entity_inst_t& dest) = 0; diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index edd90a74daa16..5daddf4b54755 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3105,6 +3105,8 @@ void OSD::handle_osd_map(MOSDMap *m) if (r != 0) do_shutdown = true; // FIXME: do_restart? + hbin_messenger->mark_down_all(); + reset_heartbeat_peers(); } } -- 2.39.5