From f68fcc0f74c75e70204fb15e4fa8553fa6ad587a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 7 Nov 2014 20:01:50 -0800 Subject: [PATCH] osdc/Objecter: objecter_inject_no_watch_ping 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 --- src/common/config_opts.h | 2 ++ src/osdc/Objecter.cc | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index d34a147b4c9fb..2077fb2967014 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index d9a80387b4901..0570d9778eb7b 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -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; -- 2.39.5