Allow configuring a pool to use a specific zone or other specific failure domain in the crush map
Is this a bug report or feature request?
- Feature Request
What should the feature do: Allow creating a Ceph pool that places data on OSDs in a specific zone (or other specific failure domain).
OSD topology for pools in Rook today is largely only controlled with the deviceClass setting (and less commonly with the crushRoot), which is not nearly as flexible as Ceph's CRUSH rules allow.
The improvement is that we want to use existing OSDs instead of requiring new OSDs that are dedicated to the replica 1 pools. Rook would need to create a custom CRUSH rule that places data only in a specific OSD. This assumes CRUSH Is capable of selecting a specific zone, without requiring a separate crush root (prototyping with the crush rules is still needed).
The pool spec could specify the specific zone placement with a setting such as specificDomain:
spec:
failureDomain: zone
specificDomain: zone1In case replicas are greater than one, the spec might look like the following with subFailureDomain:
failureDomain: zone
specificDomain: zone1
replicated:
size: 3
subFailureDomain: hostWhat is use case behind this feature:
A specific scenario that would benefit from this is when an application provides its own resiliency, and only wants to use replica-1 pools. This requires a pool to be created in each zone (corresponding to each application instance), and only OSDs in a specific zone should be used for each pool. Applications then can provision from a topology-aware storage class where the csi driver will understand the topology and provision an rbd image from the appropriate zone. Today the only way to accomplish this is by creating unique sets of OSDs with the deviceClass set to a unique name for a zone.
Environment:
Source: rook/rook