From: Ronen Friedman Date: Mon, 8 Dec 2025 15:09:30 +0000 (-0600) Subject: osd/scrub: operator abort: (not) handling in-the-mail scrubs X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8c409a8dd091b5ea391d8119ecc04088f4c80c8e;p=ceph.git osd/scrub: operator abort: (not) handling in-the-mail scrubs Fix on_operator_abort_scrub() to handle the case where the operator-initiated abort request arrives while the 'start scrub' message is still in the queue (i.e. - is_queued_or_active() is true, but is_scrub_active() is false). Unlike our handling of, for example, FullReset in PrimaryIdle::clear_state(), here we choose to ignore the request: Considering the added complexity to the FSM versus the minimal benefit, it is better to just ignore this very rare case, leaving it to the operator to re-issue the abort command if needed. Signed-off-by: Ronen Friedman --- diff --git a/src/osd/scrubber/pg_scrubber.cc b/src/osd/scrubber/pg_scrubber.cc index 0d58e1546f5..c10494629f9 100644 --- a/src/osd/scrubber/pg_scrubber.cc +++ b/src/osd/scrubber/pg_scrubber.cc @@ -802,6 +802,19 @@ void PgScrubber::on_operator_abort_scrub(ceph::Formatter* f) f->dump_bool("applicable", true); f->dump_bool("active", true); + } else if (is_queued_or_active()) { + // instead of adding logic to the FSM to handle this rare + // occasion, we will simply ignore it (and let the operators + // know they can reissue the command, if still needed). + const auto err_text = fmt::format( + "{}: pg[{}] scrub not stopped due to transitory state. Reissue!", + __func__, m_pg_id.pgid); + dout(10) << err_text << dendl; + + f->dump_bool("applicable", false); + f->dump_bool("active", true); + f->dump_string("error", err_text); + } else if (!m_scrub_job->is_registered()) { const auto err_text = fmt::format( "{}: pg[{}] is not registered for scrubbing", __func__, m_pg_id.pgid);