diff options
author | Sage Weil <sage@inktank.com> | 2013-02-12 14:10:51 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-12 14:10:51 -0800 |
commit | afda30aeaae0a65f83c6886658354ad2b57c4c43 (patch) | |
tree | caaee7ae453415423fcc9a3f5c985b5998aeb9aa | |
parent | 31e911b63d326bdd06981ec4029ad71b7479ed70 (diff) | |
download | ceph-afda30aeaae0a65f83c6886658354ad2b57c4c43.tar.gz |
osd: tolerate unexpected messages on the heartbeat interface
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>
-rw-r--r-- | src/include/ceph_features.h | 4 | ||||
-rw-r--r-- | src/osd/OSD.cc | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/include/ceph_features.h b/src/include/ceph_features.h index 0561bc4afae..cf9c8d8c27f 100644 --- a/src/include/ceph_features.h +++ b/src/include/ceph_features.h @@ -32,6 +32,7 @@ #define CEPH_FEATURE_CRUSH_TUNABLES2 (1<<25) #define CEPH_FEATURE_CREATEPOOLID (1<<26) #define CEPH_FEATURE_REPLY_CREATE_INODE (1<<27) +#define CEPH_FEATURE_OSD_HBMSGS (1<<28) /* * Features supported. Should be everything above. @@ -64,7 +65,8 @@ CEPH_FEATURE_RECOVERY_RESERVATION | \ CEPH_FEATURE_CRUSH_TUNABLES2 | \ CEPH_FEATURE_CREATEPOOLID | \ - CEPH_FEATURE_REPLY_CREATE_INODE) + CEPH_FEATURE_REPLY_CREATE_INODE | \ + CEPH_FEATURE_OSD_HBMSGS) #define CEPH_FEATURES_SUPPORTED_DEFAULT CEPH_FEATURES_ALL diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 28be06199ac..c72b36f2b40 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3407,7 +3407,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; |