Bug 1788916 - Local persistent storage operator is unexpectedly removing storageclass annotations
Summary: Local persistent storage operator is unexpectedly removing storageclass annot...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.2.z
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.4.0
Assignee: Hemant Kumar
QA Contact: Liang Xia
URL:
Whiteboard:
Depends On: 1798198
Blocks: 1803215
TreeView+ depends on / blocked
 
Reported: 2020-01-08 11:19 UTC by Pedro Amoedo
Modified: 2023-10-06 18:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1803215 1803216 (view as bug list)
Environment:
Last Closed: 2020-05-04 11:23:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift local-storage-operator pull 85 0 None closed Bug 1788916: Blocking owner deletion should prevent LocalObject from disappearing 2020-05-04 08:15:04 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:23:40 UTC

Description Pedro Amoedo 2020-01-08 11:19:09 UTC
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
[...]

Comment 15 Liang Xia 2020-02-14 08:03:13 UTC
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

Comment 18 errata-xmlrpc 2020-05-04 11:23:07 UTC
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


Note You need to log in before you can comment on or make changes to this bug.