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
add scrub persist/query API #6898
Conversation
@@ -12233,7 +12292,7 @@ void ReplicatedPG::_scrub( | |||
bufferlist bv; | |||
bv.push_back(p->second.attrs[OI_ATTR]); | |||
try { | |||
oi = object_info_t(); // Initialize optional<> before decode into it | |||
oi = object_info_t(); // Initialize optional<> before decode into it |
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.
remove this unintended space only change.
Some comments, getting close! |
i am preparing a new pull request implementing the |
ddd3d59
to
fb37a0c
Compare
@tchaikov It is unfortunate that an object_info_t here has the same name as the internal OSD struct. As the user visible one is really a complete identifier of an object maybe object_id_t or object_identifier_t would be better. |
@dzafman thanks. will go with |
bfd27ff
to
e32d61d
Compare
|
the work-in-progress test suite is posted at ceph/ceph-qa-suite#795 for proof-reading |
@@ -3994,6 +4009,16 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) | |||
scrubber.reserved_peers.clear(); | |||
} | |||
|
|||
{ | |||
hobject_t oid = Scrub::make_scrub_object(info.pgid.pgid); |
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.
There might be two shards on the same OSD for the same PG. The scrub object should probably be built using the spg_t rather than the pg_t.
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.
will do. and as will not encode the pg into the object name, as temp coll is per pg.
changes
|
the test suite: ceph/ceph-qa-suite#795 |
{ | ||
return ("SCRUB_OBJ_" + | ||
std::to_string(pool) + "." + | ||
oid.name + oid.nspace + std::to_string(oid.snap)); |
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.
This is problematic because you could have two objects in the same pg:
- name: foo namespace: bar
- name: foob namespace: ar
We need a seperator. I think there are other places in the code where object names are used to generate keys, how about using hobject_t::to_str()?
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.
will do.
I just set up a vstart cluster to play with it a bit. One thing I noticed is that after a repair, the list-inconsistent-obj api still returns the old incorrect values. I think the simplest solution would be for us to not populate the scrub store during a repair? |
will do. |
changelog
|
d36129e
to
e3e23ca
Compare
Signed-off-by: Kefu Chai <kchai@redhat.com>
to list the inconsistent PGs of given pool, it's a wrapper around the "ceph pg ls" command. Fixes: ceph#13505 Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent PGs of a given pool. this command exposes the underlying get_inconsistent_pgs() API to user. Signed-off-by: Kefu Chai <kchai@redhat.com>
which present the inconsistent objects found in scrub Fixes: ceph#13505 Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
persist inconsistent objects found when comparing the ScrubMaps collected from replica/shards. the discrepancies between the auth copy and the replica are identified as inconsistencies. and hence encoded into the omap of an object of the temp coll of the PG in question. scrub_types.{h,cpp} are introduced to hide the details of how we persist the scrub types from the librados client. Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Samuel Just <sjust@redhat.com>
for presenting the inconsistent snapsets found in scrub Signed-off-by: Kefu Chai <kchai@redhat.com>
the inconsistent snapsets are identified in ReplicatedPG::_scrub() after we compared the authorized objects with their replica/shards. these inconsistent information are stored in the omap of objects with prefix "SCRUB_SS_". Signed-off-by: Kefu Chai <kchai@redhat.com>
it is a new pg op which returns the encoded objects stored when scrubbing. Fixes: ceph#13505 Signed-off-by: Kefu Chai <kchai@redhat.com>
Fixes: ceph#13505 Signed-off-by: Kefu Chai <kchai@redhat.com>
Fixes: ceph#13505 Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent objects of a given PG, this command exposes get_inconsistent_objects() rados API to user. Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent snapsets of a given PG, this command exposes get_inconsistent_snapsets() rados API to user. Fixes: ceph#13505 Signed-off-by: Kefu Chai <kchai@redhat.com>
add scrub persist/query API Reviewed-by: Samuel Just <sjust@redhat.com>
http://tracker.ceph.com/issues/13505 Fixes: #13505
test for this PR ceph/ceph-qa-suite#795
related blueprint/discussion can be found at