From cb6f87e8c434c176015a8c11921957ec81ab0b2e Mon Sep 17 00:00:00 2001 From: parth-gr Date: Thu, 25 Nov 2021 20:27:58 +0530 Subject: [PATCH] osd: update existing OSDs with deviceClass If we apply useAllNodes to false for the current deployment, the OSDs should get updated with the individual nodes values and config, The deviceClass was not updating to the existing OSDs because there was bug in the check. The check osdInfo.DeviceClass == "" which should be checked like this osdInfo.DeviceClass == "None" Updated the code so OSDs can make use of the devices present Signed-off-by: parth-gr (cherry picked from commit cbe505d12221af6aeb2d23aa1e5b1892ad46e664) --- pkg/operator/ceph/cluster/osd/update.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/operator/ceph/cluster/osd/update.go b/pkg/operator/ceph/cluster/osd/update.go index e5dcfdbdf057..9204a3061c12 100644 --- a/pkg/operator/ceph/cluster/osd/update.go +++ b/pkg/operator/ceph/cluster/osd/update.go @@ -129,7 +129,9 @@ func (c *updateConfig) updateExistingOSDs(errs *provisionErrors) { } // backward compatibility for old deployments - if osdInfo.DeviceClass == "" { + // Checking DeviceClass with None too, because ceph-volume lvm list return crush device class as None + // Tracker https://tracker.ceph.com/issues/53425 + if osdInfo.DeviceClass == "" || osdInfo.DeviceClass == "None" { deviceClassInfo, err := cephclient.OSDDeviceClasses(c.cluster.context, c.cluster.clusterInfo, []string{strconv.Itoa(osdID)}) if err != nil { logger.Errorf("failed to get device class for existing deployment %q. %v", depName, err)