]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: tolerate unexpected messages on the heartbeat interface
authorSage Weil <sage@inktank.com>
Tue, 12 Feb 2013 22:10:51 +0000 (14:10 -0800)
committerSage Weil <sage@inktank.com>
Tue, 12 Feb 2013 22:14:39 +0000 (14:14 -0800)
We should note but not crash on unexpected messages.  Announce this awesome
new "capability" via a feature bit.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit afda30aeaae0a65f83c6886658354ad2b57c4c43)

Conflicts:

src/include/ceph_features.h

src/include/ceph_features.h
src/osd/OSD.cc

index e8a043f528043cfc9a18d0a5c31e3f55787a17c9..034a7b8506efa99d052f86334f1f5e626297be0f 100644 (file)
@@ -30,6 +30,7 @@
 #define CEPH_FEATURE_MSG_AUTH      (1<<23)
 #define CEPH_FEATURE_RECOVERY_RESERVATION (1<<24)
 #define CEPH_FEATURE_CRUSH_TUNABLES2 (1<<25)
+#define CEPH_FEATURE_OSD_HBMSGS  (1<<28)
 
 /*
  * Features supported.  Should be everything above.
@@ -60,7 +61,8 @@
         CEPH_FEATURE_BACKFILL_RESERVATION | \
         CEPH_FEATURE_MSG_AUTH |         \
         CEPH_FEATURE_RECOVERY_RESERVATION | \
-        CEPH_FEATURE_CRUSH_TUNABLES2)
+        CEPH_FEATURE_CRUSH_TUNABLES2 |      \
+        CEPH_FEATURE_OSD_HBMSGS)
 
 #define CEPH_FEATURES_SUPPORTED_DEFAULT  CEPH_FEATURES_ALL
 
index 661947b4fdfffbc72451260d5e704e6f9109be32..181b5c00003f8bae64474b08ec31ee59da42d72f 100644 (file)
@@ -3236,7 +3236,8 @@ bool OSD::heartbeat_dispatch(Message *m)
     break;
 
   default:
-    return false;
+    dout(0) << "dropping unexpected message " << *m << " from " << m->get_source_inst() << dendl;
+    m->put();
   }
 
   return true;