Repository navigation
osdc: Block balanced or localized reads if pools use tiering or direct reads. - #69047
Conversation
7555180 to
bc04ee3
Compare
| pool_full_map[it->first] = _osdmap_pool_full(it->second); | ||
| int new_blocked_flags = 0; | ||
| for (auto it = osdmap->get_pools().begin(); it != osdmap->get_pools().end(); ++it) { |
There was a problem hiding this comment.
why a nested for loop, looks like an AI wrote the code!
bc04ee3 to
fba816d
Compare
| @@ -2978,6 +2979,8 @@ class Objecter : public md_config_obs_t, public Dispatcher { | |||
| int ret = flags | global_op_flags | | |||
| extra_read_flags.load(std::memory_order_relaxed) | | |||
| CEPH_OSD_FLAG_READ; | |||
|
|
|||
| flags &= ~blocked_read_flags; | |||
There was a problem hiding this comment.
Should this be modifying the value of ret instead of flags?
flags is passed in by value and is only used to compare against CEPH_OSD_FLAG_RWORDERED before being destroyed.
ret is the value that is returned from this function.
There was a problem hiding this comment.
You are quite right... I am confused how this test appeared to pass now.
fba816d to
12db7a5
Compare
12db7a5 to
eda4b18
Compare
|
This PR is trying to address issues https://tracker.ceph.com/issues/79151 and https://tracker.ceph.com/issues/79140. There is another PR #70908 which fixes the OSD so it doesn't assert if it receives a dedup read request on a non-primary which is the other half of the fix for https://tracker.ceph.com/issues/79140 |
bill-scales
left a comment
There was a problem hiding this comment.
Not an ideal fix for the issue. Really we should be searching the request to see if
any of the ops are CACHE ops (as opposed to READ or WRITE ops) - or perhaps even
better checking if any of the ops are NOT READs.
However that would have a performance impact, this solution whilst crude is sufficient and doesn't have a performance impact.
eda4b18 to
1cd08d7
Compare
|
This PR has been added to wip-yuri4-testing-20260831.140425-main. |
|
@aainscow, What failed ceph_test_rados_api_io_pp — 4 failed tests Single shared root cause From test_cxx.h:40-44 the params are Combine(fast_ec, split_ops), and testcase_cxx.cc:410-427 maps them: /0 (false,false) → legacy EC, no split → PASS Perf counter 'objecter.split_op_reads' has incorrect value after operate(). Examples: split_op_cxx.cc:322 (ReadSecondShard), :338, :363; io_cxx.cc:538 (ReadOpPP), :688 (SparseReadOpPP), :720 (RoundTripPP2). Corroborating evidence |
Thankyou for the update. Yes - I agree this looks related. I expect we are blocking direct reads, but continuing to test them. I will see if I can recreate and fix. |
1cd08d7 to
c165e73
Compare
c165e73 to
f0e14a5
Compare
…ols in _calc_target Tiering and dedupe pools rely on read operations being directed to the primary OSD so that overlay and redirect logic can be applied correctly. When a global replica-read policy (e.g. rados_replica_read_policy=balance or rados_replica_read_policy=localize) is configured, the CEPH_OSD_FLAG_BALANCE_READS and CEPH_OSD_FLAG_LOCALIZE_READS flags were unconditionally set on every outgoing op. For pools that are a tier, have tiers, or have a dedup tier configured, sending ops to a non-primary OSD bypasses the overlay/redirect processing that those features depend on, leading to silent data mis-direction or incorrect reads. The same problem affected SplitOp: a split op issued against a tiered or deduped pool could be routed to a replica that has no knowledge of the tier relationship. Introduce pool_t::allows_nonprimary_reads() which returns true only when the pool is not a tier, does not have tiers, and has no dedup tier. In Objecter::_calc_target() the balanced/localized read flags are stripped from the op flags whenever the target pool does not allow non-primary reads. In SplitOp::create() the same predicate is used to reject split ops early, avoiding an invalid replica-targeted split on a pool that requires primary-only reads. This ensures that the global replica-read policy never overrides the correctness requirements of tiering and dedupe. Assisted-by: IBM Bob v2.1.0 Signed-off-by: Alex Ainscow <[email protected]>
f0e14a5 to
52c6425
Compare
|
This PR has been added to wip-bharath17-testing-20260910.230809-main. |
Previously, there was no mechanism to block balanced or direct reads in Objecter. Equally, there are known bugs when tiering or dedupe are used on the pool, which can cause OSDs to panic.
We do not plan on supporting these features, although there are some teuthology tests which we do not yet want to throw away.
As such, this commit adds a "blocked_read_flags" which is set when we update the osd pools to prevent any op
being processed with balanced or localised reads.
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.