Skip to content

mon, crush: Allow new pools with different CRUSH rules#8

Open
Ericmzhang wants to merge 3 commits into
aainscow:stretchy-Cfrom
Ericmzhang:wip-stretch-replica-device-classes
Open

mon, crush: Allow new pools with different CRUSH rules#8
Ericmzhang wants to merge 3 commits into
aainscow:stretchy-Cfrom
Ericmzhang:wip-stretch-replica-device-classes

Conversation

@Ericmzhang
Copy link
Copy Markdown
Collaborator

@Ericmzhang Ericmzhang commented May 18, 2026

Enable device classes for stretch mode by allowing new stretch mode pools to have different CRUSH rules.
Add validation that pools with different CRUSH rules must be stretched across the same sites (same bucket_count, bucket_target and bucket_barrier)

Added bash tests to verify

Signed-off-by: Eric Zhang emzhang@ibm.com

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

Change validation to check each shadow tree has at least num_replica_zone hosts and osds

Signed-off-by: Eric Zhang <emzhang@ibm.com>
Added validation that new pools in stretch mode have CRUSH rules that stretch across the same sites.
Allow mixing of stretch pools  with different device classes and CRUSH rules

Signed-off-by: Eric Zhang <emzhang@ibm.com>
…g CRUSH rules

Tests for allowing mixed device classess and different CRUSH rules
Test validation preventing adding new pools in stretch mode with CRUSH rules across different sites

Signed-off-by: Eric Zhang <emzhang@ibm.com>
@Ericmzhang Ericmzhang force-pushed the wip-stretch-replica-device-classes branch from 15aebd7 to 39c2fb3 Compare May 18, 2026 22:05
@Ericmzhang Ericmzhang marked this pull request as ready for review May 18, 2026 22:06
Comment thread src/mon/OSDMonitor.cc
if (ss) {
*ss << "CRUSH rule " << new_crush_rule << " is stretched across " << crush.get_type_name(dividing_id)
<< " instead of " << crush.get_type_name(osdmap.stretch_mode_bucket);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Missing return -EINVAL; ??

Comment thread src/mon/OSDMonitor.cc
}
return -EINVAL;
}
return 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why return after checking just one stretch pool?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was assuming that since we are validating that all stretch pools have the same peering_crush_bucket_count, peering_crush_bucket_target, peering_crush_bucket_barrier, and that the crush rules stretch across the same sites, then we would only need to check one pool since we guarantee all pools have the same settings. Would it be better to check all the pools?

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.

2 participants