Description of problem: Making use of Local-Storage-Operator, when having more than one storageclass and setting the local sc (kubernetes.io/no-provisioner) as default with the following command: ~~~ oc patch sc localblock-sc -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' ~~~ the annotation seems to be removed when a rolling update of the "local-disks-local-diskmaker" & "local-disks-local-provisioner" daemonsets happens: ~~~ $ oc get sc | grep local local-sc kubernetes.io/no-provisioner 12h $ oc get daemonsets -n local-storage NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE daemonset.apps/local-disks-local-diskmaker 2 2 2 2 2 <none> 12h daemonset.apps/local-disks-local-provisioner 2 2 2 2 2 <none> 12h ~~~ Version-Release number of selected component (if applicable): OCP 4.2.7 local-storage-operator.4.2.5-201911121709 How reproducible: Always (time of occurrence varies) Steps to Reproduce: 1. OCP4.2.x cluster without cloudprovider integration. 2. Local-storage-operator with proper localvolume (storageclass of type kubernetes.io/no-provisioner is automatically created) 3. Having more than one storageclass present and setting "storageclass.kubernetes.io/is-default-class: true" for the local sc. Actual results: The annotation gets removed and no default storageclass is present. Expected results: Annotation still present? Maybe the local-volume template could contemplate an extra option for that value? Master Log: N/A Node Log (of failed PODs): PFA the local-storage-operator pod logs. PV Dump: N/A PVC Dump: N/A StorageClass Dump (if StorageClass used by PV/PVC): apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: creationTimestamp: "2019-12-23T02:02:40Z" labels: local.storage.openshift.io/owner-name: local-disks local.storage.openshift.io/owner-namespace: local-storage name: local-sc ownerReferences: - apiVersion: local.storage.openshift.io/v1 controller: true kind: LocalVolume name: local-disks uid: f210129e-0c6a-11ea-8ea6-005056b96445 resourceVersion: "17762676" selfLink: /apis/storage.k8s.io/v1/storageclasses/local-sc uid: 4ca3f619-2528-11ea-9ce8-005056b96445 provisioner: kubernetes.io/no-provisioner reclaimPolicy: Delete volumeBindingMode: WaitForFirstConsumer Additional info: apiVersion: "local.storage.openshift.io/v1" kind: "LocalVolume" metadata: name: "local-disks" namespace: "local-storage" spec: storageClassDevices: - storageClassName: "local-sc" volumeMode: Filesystem fsType: xfs devicePaths: - /dev/sdb1 - /dev/sdb2 - /dev/sdb3 - /dev/sdb4 [...]
Verified the annotations (default storage class annotation) is not removed after updating localvolume CR. local-storage-operator.4.4.0-202002131916 OpenShift Version 4.4.0-0.nightly-2020-02-13-212616
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0581