]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: add ms_die_on_bad_msg option, make assert(0) conditional
authorSage Weil <sage@newdream.net>
Mon, 24 Aug 2009 18:28:10 +0000 (11:28 -0700)
committerSage Weil <sage@newdream.net>
Mon, 24 Aug 2009 18:33:51 +0000 (11:33 -0700)
RELEASE_CHECKLIST
src/config.cc
src/config.h
src/msg/Message.cc

index 3b8c9a6de01edc200b60f679d76cfe2acc92bf48..2519405b453d824de41260902852208a3da11093 100644 (file)
@@ -7,8 +7,8 @@
 - add entry to debian/changelog, with proper version
 - commit
 - git tag version
-- make dist, upload to ceph.newdream.net:ceph.newdream.net/downloads
 - build debs for amd64, i386
+- make dist, upload to ceph.newdream.net:ceph.newdream.net/downloads
 - email ml + post news entry
 
 - rebase kclient_clean
\ No newline at end of file
index 6b3cd804f18d93f9a54af0d4a863fce733660cc6..1cee555069d9e55fb8e65887d72171098ed5e08c 100644 (file)
@@ -345,6 +345,7 @@ static struct config_option config_optionsp[] = {
        OPTION(ms_fail_interval, 0, OPT_DOUBLE, 15.0),  // fail after this long
        OPTION(ms_die_on_failure, 0, OPT_BOOL, false),
        OPTION(ms_nocrc, 0, OPT_BOOL, false),
+       OPTION(ms_die_on_bad_msg, 0, OPT_BOOL, false),
        OPTION(mon_data, 0, OPT_STR, ""),
        OPTION(mon_tick_interval, 0, OPT_INT, 5),
        OPTION(mon_osd_down_out_interval, 0, OPT_INT, 300), // seconds
index 9b7597a838efa5a7f2d5c34b1d3f83f1c42944e5..6cde0ba9aab54214c8bd3358337f3fd2f2098dcf 100644 (file)
@@ -121,6 +121,7 @@ struct md_config_t {
   double ms_fail_interval;
   bool ms_die_on_failure;
   bool ms_nocrc;
+  bool ms_die_on_bad_msg;
 
   // mon
   const char *mon_data;
index d3ec2bd6b13ec4925d644aa0c4cf8c2c2432b206..018e21753804686ac2a7e2aaf01fc46e65c6c587 100644 (file)
@@ -495,7 +495,8 @@ Message *decode_message(ceph_msg_header& header, ceph_msg_footer& footer,
   catch (buffer::error *e) {
     dout(0) << "failed to decode message of type " << type << ": " << *e << dendl;
     delete e;
-    assert(0);
+    if (g_conf.ms_die_on_bad_msg)
+      assert(0);
     return 0;
   }