Skip to content

Commit 489eed6

Browse files
committed
osd/scrub: list additional information when dumping the queue
Extend the information provided for operator dump commands, to include the basic identity and scheduling information of the entries in the scrub queue. This change mostly benefits automatic QA and our internal testing. Signed-off-by: Ronen Friedman <[email protected]>
1 parent 1c93566 commit 489eed6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/osd/scrubber/osd_scrub_sched.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ bool ScrubQueue::remove_entry_unlocked(spg_t pgid, scrub_level_t s_or_d)
140140
void ScrubQueue::dump_scrubs(ceph::Formatter* f) const
141141
{
142142
ceph_assert(f != nullptr);
143+
const auto query_time = ceph_clock_now();
143144
f->open_array_section("scrubs");
144145
for_each_job(
145-
[&f](const Scrub::SchedEntry& e) {
146+
[&f, query_time](const Scrub::SchedEntry& e) {
146147
f->open_object_section("scrub");
147148
f->dump_stream("pgid") << e.pgid;
148149
f->dump_stream("sched_time") << e.schedule.not_before;
@@ -151,6 +152,15 @@ void ScrubQueue::dump_scrubs(ceph::Formatter* f) const
151152
f->dump_bool(
152153
"forced",
153154
e.schedule.scheduled_at == PgScrubber::scrub_must_stamp());
155+
156+
f->dump_stream("level") << (e.level == scrub_level_t::shallow
157+
? "shallow"
158+
: "deep");
159+
f->dump_stream("urgency") << fmt::format("{}", e.urgency);
160+
f->dump_bool("eligible", e.schedule.not_before <= query_time);
161+
f->dump_bool("overdue", e.schedule.deadline < query_time);
162+
f->dump_stream("last_issue") << fmt::format("{}", e.last_issue);
163+
154164
f->close_section();
155165
},
156166
std::numeric_limits<int>::max());

0 commit comments

Comments
 (0)