From dc47f56a3a39ae430b1806d63c09807ea9c2ba71 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 --- pkg/operator/ceph/cluster/osd/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/operator/ceph/cluster/osd/update.go b/pkg/operator/ceph/cluster/osd/update.go index 0790aed356040..165515eee68a7 100644 --- a/pkg/operator/ceph/cluster/osd/update.go +++ b/pkg/operator/ceph/cluster/osd/update.go @@ -126,7 +126,7 @@ func (c *updateConfig) updateExistingOSDs(errs *provisionErrors) { } // backward compatibility for old deployments - if osdInfo.DeviceClass == "" { + 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)