Skip to content

Commit

Permalink
Merge pull request #1903 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1902-to-release-4.12

Bug 2155402:[release-4.12] set domainLabel to "hostname" instead of "host" in topology constrained pool
  • Loading branch information
openshift-merge-robot authored Dec 23, 2022
2 parents 9a9b28c + 4034202 commit 819474b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion controllers/storagecluster/storageclasses.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,18 @@ func getTopologyConstrainedPools(initData *ocsv1.StorageCluster) string {

var topologyConstrainedPools []topologyConstrainedPool
for _, failureDomainValue := range initData.Status.FailureDomainValues {
failureDomain := initData.Status.FailureDomain
// Normally the label on the nodes is of the form kubernetes.io/hostname=<hostname>
// and the same is passed to ceph-csi through rook-ceph-opeartor-config cm.
// Hence, the ceph-non-resilient-rbd storageclass needs to have domainLabel set as hostname for topology constrained pools.
if failureDomain == "host" {
failureDomain = "hostname"
}
topologyConstrainedPools = append(topologyConstrainedPools, topologyConstrainedPool{
PoolName: generateNameForNonResilientCephBlockPool(initData, failureDomainValue),
DomainSegments: []topologySegment{
{
DomainLabel: initData.Status.FailureDomain,
DomainLabel: failureDomain,
DomainValue: failureDomainValue,
},
},
Expand Down

0 comments on commit 819474b

Please sign in to comment.