]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: objecter_inject_no_watch_ping
authorSage Weil <sage@redhat.com>
Sat, 8 Nov 2014 04:01:50 +0000 (20:01 -0800)
committerSage Weil <sage@redhat.com>
Thu, 4 Dec 2014 18:32:39 +0000 (10:32 -0800)
Tunable to prevent PINGs.  This will let us test paths the client gets
disconnected from the OSD (at least from the client's perspective).

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/osdc/Objecter.cc

index d34a147b4c9fb3c197439609ca8659bb02e1d47c..2077fb2967014ff2a571ad8c1971dc03d0dcdcc2 100644 (file)
@@ -302,6 +302,8 @@ OPTION(objecter_timeout, OPT_DOUBLE, 10.0)    // before we ask for a map
 OPTION(objecter_inflight_op_bytes, OPT_U64, 1024*1024*100) // max in-flight data (both directions)
 OPTION(objecter_inflight_ops, OPT_U64, 1024)               // max in-flight ios
 OPTION(objecter_completion_locks_per_session, OPT_U64, 32) // num of completion locks per each session, for serializing same object responses
+OPTION(objecter_inject_no_watch_ping, OPT_BOOL, false)   // suppress watch pings
+
 OPTION(journaler_allow_split_entries, OPT_BOOL, true)
 OPTION(journaler_write_head_interval, OPT_INT, 15)
 OPTION(journaler_prefetch_periods, OPT_INT, 10)   // * journal object size
index d9a80387b49013ffaf947b64b6f63652778d6b1b..0570d9778eb7b2b395d3e5a298099e32cd37cf7e 100644 (file)
@@ -502,6 +502,11 @@ void Objecter::_send_linger_ping(LingerOp *info)
   assert(rwlock.is_locked());
   assert(info->session->lock.is_locked());
 
+  if (cct->_conf->objecter_inject_no_watch_ping) {
+    ldout(cct, 10) << __func__ << " " << info->linger_id << " SKIPPING" << dendl;
+    return;
+  }
+
   utime_t now = ceph_clock_now(NULL);
   ldout(cct, 10) << __func__ << " " << info->linger_id << " now " << now << dendl;