]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix heartbeats after bad markdown
authorSage Weil <sage@newdream.net>
Mon, 15 Aug 2011 23:06:22 +0000 (16:06 -0700)
committerSage Weil <sage@newdream.net>
Mon, 15 Aug 2011 23:33:57 +0000 (16:33 -0700)
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 <sage@newdream.net>
src/msg/Messenger.h
src/osd/OSD.cc

index b5612fe8589d751a68cbd2a8693f8f4a099cbea3..6b9d82aad3c73aa7042e64dd591d430d90e89d58 100644 (file)
@@ -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;
 
index edd90a74daa16080e85121ac4a33057166ad7d17..5daddf4b547552b262d4e10d665648f60fa858bc 100644 (file)
@@ -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();
     }
   }