Repository navigation
osd: don't try to rapair-on-read on non-primary OSDs - #69234
rzarzynski wants to merge 1 commit into
Conversation
Balanced reads can happen on non-primaries while only primaries are capabale of rapairing damaged objects-on-the-fly. Since the patch non-primaries, instead of asserting, return `EIO` when a corrupted objected is encountered. Fixes: https://tracker.ceph.com/issues/76957 Signed-off-by: Radoslaw Zarzynski <[email protected]>
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
ljflores
left a comment
There was a problem hiding this comment.
Small nit: fix the typo in the commit message:
osd: don't try to rapair-on-read on non-primary OSDs
rapair --> repair
Otherwise, LGTM
|
Needs a rebase though. |
bill-scales
left a comment
There was a problem hiding this comment.
I don't think that skipping the repair of the primary object is good enough. This means that a balanced/localized read issued to a replica shard that encounters a media error will be failed back to the client and the application without trying to use the other copies.
I think we should be failing the read with EAGAIN to the client so that it retries the request to the primary. The primary can then make sure that all copies of the data have been tried before giving up on the read.
It is probably more elegant to make this change inside rep_repair_primary_object. Something like this:
@@ -15964,7 +15964,16 @@ int PrimaryLogPG::rep_repair_primary_object(const hobject_t& soid, OpContext *ct
OpRequestRef op = ctx->op;
// Only supports replicated pools
ceph_assert(!pool.info.is_erasure());
- ceph_assert(is_primary());
+
+ if (!is_primary()) {
+ // Must be a balanced/localized read that has failed on a replica.
+ // Replicas cannot run recovery, so the request need to be
+ // failed with EAGAIN to the client which will then retry the
+ // request to the primary
+ dout(10) << __func__ << " not primary, failing op with EAGAIN" << dendl;
+ osd->reply_op_error(op, -EAGAIN);
+ return -EAGAIN;
+ }
|
See #70909 for suggested alternative fix |
|
Maybe this should be closed since #70909 was merged? |
|
Category: The same tracker issue appears addressed on pr-triage note — automated candidate for human review only, not a maintainer decision. Snapshot 2026-11-10 against open PR bases. pr-triage is a personal read-only assistant by @RaminNietzsche; not affiliated with or endorsed by the Ceph project. Please verify (rebase, git cherry, tracker) before acting. |
|
I am closing because the same issue if fixed in main and the associated tracker has been redirected to #70909 |
Balanced reads can happen on non-primaries while only primaries are capabale of rapairing damaged objects-on-the-fly. Since the patch non-primaries, instead of asserting, return
EIOwhen a corrupted objected is encountered.Fixes: https://tracker.ceph.com/issues/76957
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.