]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
scrub/osd: disable blocked-scrub warnings during some tests
authorRonen Friedman <rfriedma@redhat.com>
Mon, 20 Jun 2022 12:47:57 +0000 (12:47 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 22 Jun 2022 05:24:37 +0000 (05:24 +0000)
As some Teuthology tests seem to block objects for long minutes,
we must not issue the "scrub is blocked for too long" warning
(that warning causes the tests to fail).

A new configuration parameter now controls the grace period before
the warning is issued. Some tests were modified to set this
configuration parameter to a large value.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
qa/suites/crimson-rados/basic/tasks/rados_api_tests.yaml
qa/tasks/thrashosds-health.yaml
src/common/options/osd.yaml.in
src/osd/scrubber/pg_scrubber.cc

index 328019f9fcfc967061cf7a5c2a20c084661b76ea..ad8c921425b18a9b795fd2866febf752c3826ad9 100644 (file)
@@ -19,6 +19,7 @@ overrides:
       osd:
         osd class load list: "*"
         osd class default list: "*"
+        osd blocked scrub grace period: 3600
 tasks:
 - workunit:
     clients:
index 1b2560d4ebae849f1c957d7184bad02fb75ac522..2989cc30708b7973d46538a92c642a0002cdad78 100644 (file)
@@ -3,6 +3,7 @@ overrides:
     conf:
       osd:
         osd max markdown count: 1000
+        osd blocked scrub grace period: 3600
     log-ignorelist:
       - overall HEALTH_
       - \(OSDMAP_FLAGS\)
index e170364a248dadae37e24b10355f4a84bd529e7e..ece86684ef825f61e874963e4e54f7277188b0e5 100644 (file)
@@ -447,6 +447,14 @@ options:
   see_also:
   - osd_deep_scrub_large_omap_object_key_threshold
   with_legacy: true
+# when scrubbing blocks on a locked object
+- name: osd_blocked_scrub_grace_period
+  type: int
+  level: advanced
+  desc: Time (seconds) before issuing a cluster-log warning
+  long_desc: Waiting too long for an object in the scrubbed chunk to be unlocked.
+  default: 120
+  with_legacy: true
 # where rados plugins are stored
 - name: osd_class_dir
   type: str
index fd40808344892145cd1654a44abee742c92c037f..114e287aae4fad4b9e102b6c4d2c4adf191be53c 100644 (file)
@@ -775,7 +775,17 @@ bool PgScrubber::range_intersects_scrub(const hobject_t& start,
 
 Scrub::BlockedRangeWarning PgScrubber::acquire_blocked_alarm()
 {
-  ceph::timespan grace_period{m_debug_blockrange?4s:120s};
+  int grace = get_pg_cct()->_conf->osd_blocked_scrub_grace_period;
+  if (grace == 0) {
+    // we will not be sending any alarms re the blocked object
+    dout(20)
+      << __func__
+      << ": blocked-alarm disabled ('osd_blocked_scrub_grace_period' set to 0)"
+      << dendl;
+    return nullptr;
+  }
+  ceph::timespan grace_period{m_debug_blockrange ? 4s : seconds{grace}};
+  dout(30) << __func__ << ": timeout:" << grace_period.count() << dendl;
   return std::make_unique<blocked_range_t>(m_osds,
                                           grace_period,
                                           *this,