Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set default CephDeviceClass in the status only if it's not set yet
The sc.Status.DefaultCephDeviceClass helps us to set the deviceClasses on the pool on the CRs. Till now we are trying to determine the field in each reconcile loop. But with the introduction of multiple deviceClasses support in day-2, we can't always determine it as the logic for the determination is that it chooses the first non replica-1 deviceClass from the list of deviceClasses on the cephCluster CR status. If we determine it in each reconcile loop, we are running the risk of going back & forth between the multiple non replica-1 deviceClasses. Although the current ceph logic returns the list in a consistent order so the problem shouldn't appear today, but any change in this logic might introduce future bugs. as we have the assurance that any additional deviceClass will be added in day-2 only so we can safely set the default deviceClass in the status only if it's not set yet & not touch it there after. Signed-off-by: Malay Kumar Parida <[email protected]>
- Loading branch information