-
Bug
-
Resolution: Done
-
Major
-
None
-
4.14
-
None
-
Important
-
No
-
Rejected
-
False
-
Description of problem:
A caller of ApplyStorageClass(), for example syncStorageClass() from pkg/operator/csi/csistorageclasscontroller/csi_storageclass_controller.go, may want to make decision about new state of StorageClass based on a state of objects it received by:
existingSCs, err := storageClassLister.List(labels.Everything())
In this case, to avoid races (like one explained in https://issues.redhat.com/browse/OCPBUGS-14824), it's crucial to pass ResourceVersion from the caller to ApplyStorageClass().
If "required" arg of ApplyStorageClass() has ResourceVersion set, then it must fail update operation if newly read StorageClass has newer version.
- clones
-
OCPBUGS-14824 CSI Driver Operators should not update the default storageclass annotation back after customers set the default storageclass annotation to false
- Closed