Skip to content

squid: mon [stretch-mode]: Allow a max bucket weight diff threshold - #67789

Merged
batrick merged 1 commit into
ceph:squidfrom
kamoltat:wip-75494-squid
Jul 27, 2026
Merged

batrick merged 1 commit into
ceph:squidfrom
kamoltat:wip-75494-squid

Conversation

@kamoltat

Copy link
Copy Markdown
Member

@github-actions

Copy link
Copy Markdown

Config Diff Tool Output

+ added: mon_stretch_max_bucket_weight_delta (mon.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@shraddhaag shraddhaag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code changes are exactly as per the original PR. Just a minor comment about the release notes!

Comment thread PendingReleaseNotes Outdated
Comment on lines +21 to +23
* RADOS: Stretch mode can now be entered even if the two dividing buckets differ
in weight by a small fraction (default 0.1). This is tunable via
`mon_stretch_max_bucket_weight_delta`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep you're correct, just made the change thank you! @shraddhaag

@shraddhaag

Copy link
Copy Markdown
Contributor

Hi @kamoltat,

while reviewing the run with this PR, I came across a PR that might be related to this PR, could you please check? More details here: #65458 (comment)

@kamoltat

Copy link
Copy Markdown
Member Author

@shraddhaag Ack!, checking!

@kamoltat

kamoltat commented Mar 25, 2026 •

Copy link
Copy Markdown
Member Author

@shraddhaag
I think we failed because

2026-03-19T15:08:13.205 INFO:tasks.workunit.client.0.trial076.stdout:HEALTH_WARN 1 pool(s) do not have an application enabled
2026-03-19T15:08:13.205 INFO:tasks.workunit.client.0.trial076.stdout:[WRN] POOL_APP_NOT_ENABLED: 1 pool(s) do not have an application enabled
2026-03-19T15:08:13.205 INFO:tasks.workunit.client.0.trial076.stdout:    application not enabled on pool 'stretched_rbdpool'
2026-03-19T15:08:13.205 INFO:tasks.workunit.client.0.trial076.stdout:    use 'ceph osd pool application enable <pool-name> <app-name>', where <app-name> is 'cephfs', 'rbd', 'rgw', or freeform for custom applications.

basically just need to enable pool application for the stretched_rbdpool.

I'm surprised it passes in main though.

This is what I'm going to do, I'm gonna schedule a few main runs hitting this test case, and will also schedule a few runs in squid with patch to see if this is deterministic.

@kamoltat

kamoltat commented Mar 25, 2026 •

Copy link
Copy Markdown
Member Author

main test scheduled to check: https://pulpito.ceph.com/ksirivad-2026-03-25_17:41:46-rados:standalone-main-distro-default-trial/

squid-yuri-10 scheduled to see deterministics:
https://pulpito.ceph.com/ksirivad-2026-03-25_17:44:03-rados:standalone-wip-yuri10-testing-2026-03-18-1445-squid-distro-default-trial/

Update:
main test passed 100% while squid failed 100%, looking into what changed

main test passed because we never encountered `HEALTH_WARN 1 pool(s) do not have an application enabled

2026-03-25T17:55:50.963 INFO:tasks.workunit.client.0.trial106.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh:135: TEST_stretch_cluster_uneven_crush_weights:  ceph osd crush reweight osd.0 0.08999
2026-03-25T17:55:51.230 INFO:tasks.workunit.client.0.trial106.stderr:reweighted item id 0 name 'osd.0' to 0.08999 in crush map
2026-03-25T17:55:51.241 INFO:tasks.workunit.client.0.trial106.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh:136: TEST_stretch_cluster_uneven_crush_weights:  sleep 5
2026-03-25T17:55:56.243 INFO:tasks.workunit.client.0.trial106.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh:137: TEST_stretch_cluster_uneven_crush_weights:  wait_for_health_ok
2026-03-25T17:55:56.243 INFO:tasks.workunit.client.0.trial106.stderr:/home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:1879: wait_for_health_ok:  wait_for_health HEALTH_OK

lumir-sliva added a commit to lumir-sliva/rook that referenced this pull request Apr 22, 2026
Allow a stretch cluster to be configured when the two zones' CRUSH
weights differ by up to 10%, matching the tolerance Ceph itself adopted
in ceph/ceph#66580 (mon_stretch_max_bucket_weight_delta, default 0.1).

The relaxed check is available on Umbrella (v21+) and was backported
to tentacle v20.2.2 via ceph/ceph#67790. The squid backport
(ceph/ceph#67789) is still pending; the version gate can be loosened
to include squid once it lands.

Closes: rook#17206
Signed-off-by: Lumir Sliva <[email protected]>
lumir-sliva added a commit to lumir-sliva/rook that referenced this pull request Apr 22, 2026
Allow a stretch cluster to be configured when the two zones' CRUSH
weights differ by up to 10%, matching the tolerance Ceph itself adopted
in ceph/ceph#66580 (mon_stretch_max_bucket_weight_delta, default 0.1).

The relaxed check is available on Umbrella (v21+) and was backported
to tentacle v20.2.2 via ceph/ceph#67790. The squid backport
(ceph/ceph#67789) is still pending; the version gate can be loosened
to include squid once it lands.

Closes: rook#17206

Signed-off-by: Lumir Sliva <[email protected]>
lumir-sliva added a commit to lumir-sliva/rook that referenced this pull request Apr 22, 2026
Allow a stretch cluster to be configured when the two zones' CRUSH
weights differ by up to 10%, matching the tolerance Ceph itself adopted
in ceph/ceph#66580 (mon_stretch_max_bucket_weight_delta, default 0.1).

The relaxed check is available on Umbrella (v21+) and was backported
to tentacle v20.2.2 via ceph/ceph#67790. The squid backport
(ceph/ceph#67789) is still pending; the version gate can be loosened
to include squid once it lands.

Signed-off-by: Lumir Sliva <[email protected]>
lumir-sliva added a commit to lumir-sliva/rook that referenced this pull request Apr 22, 2026
Allow a stretch cluster to be configured when the two zones' CRUSH
weights differ by up to ten percent, matching the tolerance Ceph itself
adopted in ceph/ceph#66580 (mon_stretch_max_bucket_weight_delta, default
0.1).

The relaxed check is available on Umbrella (v21+) and was backported
to tentacle v20.2.2 via ceph/ceph#67790. The squid backport
(ceph/ceph#67789) is still pending; the version gate can be loosened
to include squid once it lands.

Signed-off-by: Lumir Sliva <[email protected]>
Problem:
Users ran into a problem where the crush bucket
weight different check in stretch mode is too strict, e.g.,
one of the disk that is added to one of the node had slight variation
in the capacity and this caused ceph to fail from enabling the stretch
cluster because crush weight is not balanced. The difference was very small.

Solution:
- Introducing: mon_stretch_max_bucket_weight_delta in mon.yaml.in
  this config var is default to 0.1 and is used as a threshold
  to allow the difference between the two crush buckets in stretch mode
  to be no greater than 10%.
- Introducing: STRETCH_MODE_BUCKET_WEIGHT_IMBALANCE as health warnings
  when the weight delta between the two sites exceeds 10%
- Modified documentations
- Modified tests that exercises this code path

Fixes: https://tracker.ceph.com/issues/72994

Signed-off-by: Kamoltat Sirivadhna <[email protected]>
(cherry picked from commit d58de51)

Conflicts:
	doc/rados/operations/health-checks.rst - trivial fix
	PendingReleaseNotes - delete this file
Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
@Naveenaidu

Copy link
Copy Markdown
Contributor

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Jul 27, 2026
@github-actions github-actions Bot removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. labels Jul 27, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 27, 2026
@batrick batrick removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #67789 SOURCE PR SOURCE STATUS
0988235 mon [stretch-mode]: Allow a max bucket weight diff threshold PR #66580 d58de51 mon [stretch-mode]: Allow a max bucket weight diff threshold

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport 0988235 (cherry-pick of d58de51)

Affected File(s)

Range Diff

Click to expand
--- Original (d58de517)
+++ Backport (09882355)
@@ -20,3 +20,9 @@
 Fixes: https://tracker.ceph.com/issues/72994
 
 Signed-off-by: Kamoltat Sirivadhna <[email protected]>
+(cherry picked from commit d58de5174d05ad2df1f1d6771abf504b25e62c54)
+
+Conflicts:
+	doc/rados/operations/health-checks.rst - trivial fix
+	PendingReleaseNotes - delete this file
+Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>

================================================================================
RANGE DIFF
================================================================================

1:  d58de5174d0 ! 1:  09882355dad mon [stretch-mode]: Allow a max bucket weight diff threshold
    @@ Commit message
         Fixes: https://tracker.ceph.com/issues/72994
     
         Signed-off-by: Kamoltat Sirivadhna <[email protected]>
    +    (cherry picked from commit d58de5174d05ad2df1f1d6771abf504b25e62c54)
     
    - ## PendingReleaseNotes ##
    -@@
    -   the I/O capacity of the OSD.
    -   The default stride size (``osd_deep_scrub_stride``) was 512 KBytes, and is now 4 MBytes.
    - 
    -+* RADOS: Stretch mode can now be entered even if the two dividing buckets differ
    -+  in weight by a small fraction (default 0.1). This is tunable via
    -+  `mon_stretch_max_bucket_weight_delta`.
    -+
    - * CephFS: The offline CephFS tools (cephfs-data-scan, cephfs-journal-tool,
    -   and cephfs-table-tool) now include progress tracking with ETA (Estimated Time of
    -   Arrival) for long-running operations. Progress updates are displayed automatically
    +    Conflicts:
    +            doc/rados/operations/health-checks.rst - trivial fix
    +            PendingReleaseNotes - delete this file
    +    Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
     
      ## doc/rados/operations/health-checks.rst ##
     @@ doc/rados/operations/health-checks.rst: until the condition is fixed.
    - We encourage you to fix this by removing additional dividing CRUSH buckets or by increasing the
    - number of dividing buckets to two. For more information, see :ref:`stretch_mode`.
    + We encourage you to fix this by removing additional dividing buckets or bump the
    + number of dividing buckets to 2.
      
     -UNEVEN_WEIGHTS_STRETCH_MODE
     -___________________________
    @@ doc/rados/operations/health-checks.rst: until the condition is fixed.
     +when stretch mode is enabled. This is determined by the configuration option
     +``mon_stretch_max_bucket_weight_delta`` (default: 0.1).
      
    --The two dividing CRUSH buckets must have equal weights when stretch mode is enabled.
    --This warning suggests that the two dividing buckets have uneven weights after
    +-The 2 dividing buckets must have equal weights when stretch mode is enabled.
    +-This warning suggests that the 2 dividing buckets have uneven weights after
     -stretch mode is enabled. This is not immediately fatal, however, you can expect
     -Ceph to be confused when trying to process transitions between dividing buckets.
     +This is not immediately fatal, however, you can expect Ceph to experience performance bottlenecks
     +and imbalanced PG distribution if the aggregate CRUSH weights of the buckets differ significantly,
     +as the smaller bucket will carry a higher I/O load per OSD.
      
    --We encourage you to fix this by making the weights even on both dividing CRUSH buckets.
    +-We encourage you to fix this by making the weights even on both dividing buckets.
     +We encourage you to fix this by making the weights of the dividing buckets more even.
      This can be done by making sure the combined weight of the OSDs on each dividing
    --bucket are the same. For more information, see :ref:`stretch_mode`.
    +-bucket are the same.
     +bucket are within the fractional difference defined by
     +``mon_stretch_max_bucket_weight_delta``.
      
    @@ qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: function run() {
          local dir=$1
          local OSDS=4
          local weight=0.09000
    +@@ qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: EOF
    +     local stretched_poolname=stretched_rbdpool
    +     ceph osd pool create $stretched_poolname 32 32 stretch_rule || return 1
    +     ceph osd pool set $stretched_poolname size 4 || return 1
    ++    ceph osd pool application enable $stretched_poolname rbd || return 1
    + 
    +     ceph mon set_location e zone=arbiter host=node-1 || return 1
    +     ceph mon enable_stretch_mode e stretch_rule zone || return 1 # Enter strech mode
     @@ qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: EOF
          ceph osd crush rm sham # clear the health warn
          wait_for_health_gone "INCORRECT_NUM_BUCKETS_STRETCH_MODE" || return 1

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 27, 2026
@batrick
batrick merged commit 6c38e07 into ceph:squid Jul 27, 2026
25 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants