Repository navigation
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
16 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
verify_upmap() walks each step of a CRUSH rule and, for each choose_firstn/choose_indep step at a non-leaf type, asserts that the number of distinct parents of that type in the candidate up set does not exceed the step's numrep. This is correct for a single-level rule, but it ignores the fact that an inner choose step's numrep is per outer-bucket-result. For an EC 6+4 pool with the rule take <root> choose_indep 5 type pod choose_indep 2 type rack chooseleaf_indep 1 type osd emit a valid up set legitimately contains 10 distinct racks (2 per pod * 5 pods). The current check evaluates 10 > 2 and returns -EINVAL, so any pg-upmap-items the operator sets is silently removed by check_pg_upmaps in the next osdmap epoch. Track a running product of numrep across prior choose/chooseleaf steps in the current TAKE..EMIT scope. Compare each inner choose step's parents_of_type count against numrep * outer_numrep_product instead of numrep alone. Reset the product on TAKE and EMIT so multi-rule scripts behave correctly. Single-level rules behave identically: outer_numrep_product is 1 for the first choose step after TAKE. Builds on prior unmerged patches in tracker ceph#51729 (Laura Flores's wip-tracker-51729 branch, comment ceph#22, and Andras Pataki's revision in comment ceph#24). This revision keeps the running product separate from type_stack to preserve per-level numrep semantics, resets it across multiple TAKE..EMIT scopes, and is paired with unit-test coverage in a follow-up commit. Fixes: https://tracker.ceph.com/issues/51729 Suggested-by: Laura Flores <[email protected]> Suggested-by: Andras Pataki <[email protected]> Signed-off-by: Leon Gao <[email protected]>
Add two unit tests to cover the verify_upmap fix: * verify_upmap_nested_choose -- builds a multi-level CRUSH rule (choose pod, choose rack, chooseleaf osd) shaped like the multi-level EC rules reported in tracker ceph#51729 (e.g. the rack/chassis/host rule in note ceph#9, the pod/rack/osd rule in note ceph#24). Asserts natural CRUSH outputs and same-rack upmap targets validate, while genuinely invalid up sets (spanning more pods than numrep allows) are still rejected. * verify_upmap_single_level -- regression guard for plain single-level chooseleaf rules; ensures the new outer_numrep_product accounting does not change behavior for the common single-step case. The first test fails on the unfixed verify_upmap because the inner choose-rack step counts 4 distinct racks against numrep=2 and returns -EINVAL. Related: https://tracker.ceph.com/issues/51729 Signed-off-by: Leon Gao <[email protected]>
4b05800 to
9b929e5
Compare
|
@ljflores Gentle ping in case this slipped away, thanks! |
|
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. |
|
I came at verify_upmap from a different angle (multi-take rules, #71053) and read through this one. I applied it on top of current main and ran the suite: your two tests pass, along with the rest of unittest_crush_wrapper (26/26) and unittest_osdmap (41/41). The approach looks right to me — the inner step's numrep is per outer result, so comparing the total against numrep alone is wrong. Two small things:
Since it touches the same lines: the checks still run against the whole |
|
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. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
Summary
verify_upmap()checks each choose step'snumrepagainst the count of distinct parents in the candidate up set, but ignores that an inner choose step'snumrepis per outer-bucket-result. For multi-level rules (e.g.choose pod -> choose rack -> chooseleaf osd) a legitimate up set spansnumrep * outer_numrep_productdistinct buckets, so valid upmaps are rejected and silently removed bycheck_pg_upmapsin the next osdmap epoch.This fix tracks a running product of
numrepacross prior choose/chooseleaf steps in the currentTAKE..EMITscope and compares each inner step againstnumrep * outer_numrep_product. Single-level rules are unaffected (the product is 1 for the first step after TAKE).Issue tracker: https://tracker.ceph.com/issues/51729
Test plan
unittest_crush_wrapper-- newverify_upmap_nested_choose(asserts previously-rejected nested-choose up sets now validate, and genuinely invalid sets still fail) andverify_upmap_single_levelregression guard.pod -> rack -> osdrule;pg-upmap-itemsentries persist across osdmap epochs (pre-fix they were silently removed).