Skip to content

Commit

Permalink
Merge pull request #945 from crombus/remove_deviceType
Browse files Browse the repository at this point in the history
storagecluster: remove the deviceType from validateStorageDeviceSets
  • Loading branch information
openshift-merge-robot committed Dec 10, 2020
2 parents a602d12 + 2c9e6e1 commit 2b08dd6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/controller/storagecluster/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,7 @@ func (r *ReconcileStorageCluster) validateStorageDeviceSets(sc *ocsv1.StorageClu
}
}
if ds.DeviceType != "" {
if (DeviceTypeSSD == strings.ToLower(ds.DeviceType)) || (DeviceTypeHDD == strings.ToLower(ds.DeviceType)) || (DeviceTypeNVMe == strings.ToLower(ds.DeviceType)) {
metav1.SetMetaDataAnnotation(&sc.ObjectMeta, "crushDeviceClass", ds.DeviceType)
} else {
if (DeviceTypeSSD != strings.ToLower(ds.DeviceType)) && (DeviceTypeHDD != strings.ToLower(ds.DeviceType)) && (DeviceTypeNVMe != strings.ToLower(ds.DeviceType)) {
return fmt.Errorf("failed to validate DeviceType %q: no Device of this type", ds.DeviceType)
}
}
Expand Down

0 comments on commit 2b08dd6

Please sign in to comment.