-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osd/scrub: Add stats to PG dump for number of objects scrubbed #42735
Conversation
75930e1
to
7b61c11
Compare
7b61c11
to
6ec731f
Compare
can you add a test for this? perhaps the existing scrub tests could check that the field is populated? |
src/osd/pg_scrubber.cc
Outdated
@@ -1279,6 +1279,8 @@ void PgScrubber::scrub_compare_maps() | |||
{ | |||
dout(10) << __func__ << " has maps, analyzing" << dendl; | |||
|
|||
int64_t primary_objects = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed (esp. so far from the usage point)
src/osd/pg_scrubber.cc
Outdated
@@ -1319,6 +1321,8 @@ void PgScrubber::scrub_compare_maps() | |||
|
|||
dout(2) << __func__ << ": primary (" << m_pg->get_primary() << ") has " | |||
<< m_primary_scrubmap.objects.size() << " items" << dendl; | |||
primary_objects = m_primary_scrubmap.objects.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int primary_objects = ...
jenkins test api |
990b449
to
6214650
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
Addition of a new column in PG dump, OBJECTS_SCRUBBED, which keeps track of the number of objects scrubbed. Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
…er of objects in a PG once a scrub finishes Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
6214650
to
91885f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from minor comments.
'primary_objects' fix is the one I would consider a must.
|
||
TESTDATA="testdata.$$" | ||
|
||
setup $dir || return 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that standard_scrub_cluster() in qa/standalone/scrub/scrub_helpers.sh might save you from some of this boilerplate startup code
src/osd/scrubber/pg_scrubber.cc
Outdated
@@ -1370,6 +1370,8 @@ void PgScrubber::scrub_compare_maps() | |||
{ | |||
dout(10) << __func__ << " has maps, analyzing" << dendl; | |||
|
|||
int64_t primary_objects = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just declare primary_objects where it's used? (if at all)
src/osd/scrubber/pg_scrubber.cc
Outdated
@@ -1410,6 +1412,8 @@ void PgScrubber::scrub_compare_maps() | |||
|
|||
dout(2) << __func__ << ": primary (" << m_pg->get_primary() << ") has " | |||
<< m_primary_scrubmap.objects.size() << " items" << dendl; | |||
primary_objects = m_primary_scrubmap.objects.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just skip 'primary_objects' altogether (the only good reason to have it would
have been to use it in the dout() in the previous line)
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
The pg dump output will now look like this:
After scrub:
|
the "scrubbing for 0 seconds" in the final listing is strange. Not sure if caused by this PR or not, but if so - seems an additional stat update is needed |
@ronen-fr I don't think it is caused by this PR but I think it's happening in cases where the scrub duration is lesser than 1 second. https://github.com/ceph/ceph/blob/master/src/osd/scrubber/pg_scrubber.cc#L2031 we are trying to get the difference in seconds and that might be returning 0 in such a scenario. |
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
My problem is with the "scrubbing for" persisting after scrubbing is done. It should have read "scheduled ...". That's why I fear we're missing an update. |
|
Failures unrelated, tracked in: Details: |
jenkins test api |
jenkins test make check |
jenkins test api |
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
A refactoring of the scrub backend code (all Scrub related code that checks/manipulates objects' (meta)data). Part of the refactoring was breaking long chunks of code into separate functions. In order to avoid passing endless lists of state parameters from/to these new methods, the scrub backend state is now maintained within its own objects. a change to note: Instead of two scrub-map collections - one that holds all incoming maps, and one that holds pointers to all of those incoming plus the one we (the Primary) manage - just use one collection for both incoming and our own. Signed-off-by: Ronen Friedman <rfriedma@redhat.com> Split from "osd/scrub: minor fixes split from main "scrub backend" commit" Split from "osd/scrub: scrub components embedded documentation" fix Signed-off-by: Ronen Friedman <rfriedma@redhat.com> osd/scrub: fix the scrubber backend to include all PR ceph#42735 Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
to publish the last scrub status report. The change is needed following the merge of PR ceph#42735. Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
to publish the last scrub status report. The change is needed following the merge of PR #42735. Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
A refactoring of the scrub backend code (all Scrub related code that checks/manipulates objects' (meta)data). Part of the refactoring was breaking long chunks of code into separate functions. In order to avoid passing endless lists of state parameters from/to these new methods, the scrub backend state is now maintained within its own objects. a change to note: Instead of two scrub-map collections - one that holds all incoming maps, and one that holds pointers to all of those incoming plus the one we (the Primary) manage - just use one collection for both incoming and our own. Signed-off-by: Ronen Friedman <rfriedma@redhat.com> Split from "osd/scrub: minor fixes split from main "scrub backend" commit" Split from "osd/scrub: scrub components embedded documentation" fix Signed-off-by: Ronen Friedman <rfriedma@redhat.com> osd/scrub: fix the scrubber backend to include all PR #42735 Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
to publish the last scrub status report. The change is needed following the merge of PR ceph#42735. Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
A refactoring of the scrub backend code (all Scrub related code that checks/manipulates objects' (meta)data). Part of the refactoring was breaking long chunks of code into separate functions. In order to avoid passing endless lists of state parameters from/to these new methods, the scrub backend state is now maintained within its own objects. a change to note: Instead of two scrub-map collections - one that holds all incoming maps, and one that holds pointers to all of those incoming plus the one we (the Primary) manage - just use one collection for both incoming and our own. Signed-off-by: Ronen Friedman <rfriedma@redhat.com> Split from "osd/scrub: minor fixes split from main "scrub backend" commit" Split from "osd/scrub: scrub components embedded documentation" fix Signed-off-by: Ronen Friedman <rfriedma@redhat.com> osd/scrub: fix the scrubber backend to include all PR ceph#42735 Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
to publish the last scrub status report. The change is needed following the merge of PR ceph#42735. Signed-off-by: Ronen Friedman <rfriedma@redhat.com> (cherry picked from commit ab032e9)
A refactoring of the scrub backend code (all Scrub related code that checks/manipulates objects' (meta)data). Part of the refactoring was breaking long chunks of code into separate functions. In order to avoid passing endless lists of state parameters from/to these new methods, the scrub backend state is now maintained within its own objects. a change to note: Instead of two scrub-map collections - one that holds all incoming maps, and one that holds pointers to all of those incoming plus the one we (the Primary) manage - just use one collection for both incoming and our own. Signed-off-by: Ronen Friedman <rfriedma@redhat.com> Split from "osd/scrub: minor fixes split from main "scrub backend" commit" Split from "osd/scrub: scrub components embedded documentation" fix Signed-off-by: Ronen Friedman <rfriedma@redhat.com> osd/scrub: fix the scrubber backend to include all PR ceph#42735 Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Addition of a new column in PG dump, OBJECTS_SCRUBBED, which keeps track of the number of objects scrubbed.
Signed-off-by: Aishwarya Mathuria amathuri@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox