From: Patrick Donnelly Date: Sat, 3 Oct 2020 00:11:54 +0000 (-0700) Subject: osdc: add timeout configs for mons/osds X-Git-Tag: v15.2.8~5^2~1^2~21^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c25acb50eaa0ec746de529734ebc2c1761e78d73;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 (cherry picked from commit a8a23747aa081d938c9b277ab42507dd506bf6c2) Conflicts: src/client/Client.cc src/librados/RadosClient.cc src/mds/MDSRank.cc src/mgr/MgrStandby.cc src/mon/MonClient.h src/neorados/RADOSImpl.cc src/osd/OSD.cc src/osdc/Objecter.cc src/osdc/Objecter.h src/test/mon/test_mon_workloadgen.cc src/tools/cephfs/MDSUtility.cc Notes: different Objecter cons arguments. Added conf obs for RadosClient. --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 57295f19aba..1485dd3d59d 100755 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -14744,7 +14744,7 @@ mds_rank_t Client::_get_random_up_mds() const StandaloneClient::StandaloneClient(Messenger *m, MonClient *mc) - : Client(m, mc, new Objecter(m->cct, m, mc, NULL, 0, 0)) + : Client(m, mc, new Objecter(m->cct, m, mc, nullptr)) { 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 4b2422f6443..e59913b37bf 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1239,8 +1239,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 baba92debd1..e79be858e95 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5145,13 +5145,17 @@ std::vector