rbd: add capability to automatically enable read affinity

This commit makes use of crush location labels from node
labels to supply `crush_location` and `read_from_replica=localize`
options during rbd map cmd. Using these options, ceph
will be able to redirect reads to the closest OSD,
improving performance.

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2023-02-02 15:16:37 +05:30
committed by mergify[bot]
parent 6e6cddb096
commit 95682522ee
7 changed files with 401 additions and 21 deletions

View File

@ -147,6 +147,10 @@ type Config struct {
// Cluster name
ClusterName string
// Read affinity related options
EnableReadAffinity bool // enable OSD read affinity.
CrushLocationLabels string // list of CRUSH location labels to read from the node.
}
// ValidateDriverName validates the driver name.