From: Patrick Donnelly Date: Sat, 3 Oct 2020 00:11:54 +0000 (-0700) Subject: osdc: add timeout configs for mons/osds X-Git-Tag: v16.1.0~814^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8a23747aa081d938c9b277ab42507dd506bf6c2;p=ceph.git osdc: add timeout configs for mons/osds Have the Objecter track the rados_(mon|osd)_op_timeout configs so that it can be configured at runtime/startup. This is useful for the MDS/ceph-fuse so that we can avoid waiting forever for a response from the Monitors that will never come (statfs on a deleted file system's pools). Also: make these configs take a time value rather than double. This is simpler to deal with in the code and allows time units to be used (e.g. "5m" for 5 minutes). Fixes: https://tracker.ceph.com/issues/47734 Signed-off-by: Patrick Donnelly --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 7fcc41933c33..90329d04949f 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -15059,7 +15059,7 @@ mds_rank_t Client::_get_random_up_mds() const StandaloneClient::StandaloneClient(Messenger *m, MonClient *mc, boost::asio::io_context& ictx) - : Client(m, mc, new Objecter(m->cct, m, mc, ictx, 0, 0)) + : Client(m, mc, new Objecter(m->cct, m, mc, ictx)) { monclient->set_messenger(m); objecter->set_client_incarnation(0); diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 32e6838f68f8..7e6c20de46e5 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1230,8 +1230,6 @@ OPTION(journal_discard, OPT_BOOL) //using ssd disk as journal, whether support d OPTION(fio_dir, OPT_STR) // fio data directory for fio-objectstore -OPTION(rados_mon_op_timeout, OPT_DOUBLE) // how many seconds to wait for a response from the monitor before returning an error from a rados operation. 0 means no limit. -OPTION(rados_osd_op_timeout, OPT_DOUBLE) // how many seconds to wait for a response from osds before returning an error from a rados operation. 0 means no limit. OPTION(rados_tracing, OPT_BOOL) // true if LTTng-UST tracepoints should be enabled diff --git a/src/common/options.cc b/src/common/options.cc index ee79029e9730..1cc5a4fc74e4 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5249,13 +5249,17 @@ std::vector