Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-7343

PV created using LSO with LV using by-path ids shows incorrect annotation

XMLWordPrintable

    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None

      From https://bugzilla.redhat.com/show_bug.cgi?id=2115728 

      Description of problem:

      PV created using LSO LV using by-path ids shows incorrect annotation

      Version-Release number of selected component (if applicable):

      OCP: 4.11.0-rc.6
      LSO: 4.11.0-202207121147 provided by Red Hat
      Arch: s390x

      How reproducible:

      Always

      Steps to Reproduce:

      1. Install a cluster.
      2. Install LSO
      3. Create LocalVolume Resource using by-path ids, for example:
      apiVersion: "local.storage.openshift.io/v1"
      kind: "LocalVolume"
      metadata:
        name: "local-disks"
        namespace: "openshift-local-storage"
      spec:
        nodeSelector:
          nodeSelectorTerms:
          - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                - worker5
                - worker7
        storageClassDevices:
          - storageClassName: "local-sc"
            volumeMode: Filesystem
            fsType: xfs
            devicePaths:
              - /dev/disk/by-path/ccw-0.0.0003
              - /dev/disk/by-path/ccw-0.0.0004 

      Actual results:

      Verify the generated PVs, The mount path uses by-path id. However Annotations shows vda, vdb which may change with reboot of the node and can be misleading.
      
      annotations:
          pv.kubernetes.io/provisioned-by: local-volume-provisioner-worker7-d55727b8-b74a-4fca-bc6d-53925ba5deb6
          storage.openshift.com/device-name: vdd
      
      local:
          path: /mnt/local-storage/local-sc/ccw-0.0.0003
          fsType: xfs

      Expected results:

       By-path id be used instead.
      

      Additional info:

      Master Log:
      
      Node Log (of failed PODs):
      
      PV Dump:
      kind: PersistentVolume
      apiVersion: v1
      metadata:
        name: local-pv-1994f0dd
        uid: b8b55642-cd87-4997-a982-bdc49b332595
        resourceVersion: '423480'
        creationTimestamp: '2022-08-02T19:46:50Z'
        labels:
          kubernetes.io/hostname: worker7
          storage.openshift.com/local-volume-owner-name: local-disks
          storage.openshift.com/local-volume-owner-namespace: openshift-local-storage
          storage.openshift.com/owner-kind: LocalVolume
          storage.openshift.com/owner-name: local-disks
          storage.openshift.com/owner-namespace: openshift-local-storage
        annotations:
          pv.kubernetes.io/provisioned-by: local-volume-provisioner-worker7-d55727b8-b74a-4fca-bc6d-53925ba5deb6
          storage.openshift.com/device-name: vdd
        finalizers:
          - kubernetes.io/pv-protection
        managedFields:
          - manager: diskmaker
            operation: Update
            apiVersion: v1
            time: '2022-08-02T19:46:50Z'
            fieldsType: FieldsV1
            fieldsV1:
              'f:metadata':
                'f:annotations':
                  .: {}
                  'f:pv.kubernetes.io/provisioned-by': {}
                  'f:storage.openshift.com/device-name': {}
                'f:labels':
                  .: {}
                  'f:kubernetes.io/hostname': {}
                  'f:storage.openshift.com/local-volume-owner-name': {}
                  'f:storage.openshift.com/local-volume-owner-namespace': {}
                  'f:storage.openshift.com/owner-kind': {}
                  'f:storage.openshift.com/owner-name': {}
                  'f:storage.openshift.com/owner-namespace': {}
              'f:spec':
                'f:accessModes': {}
                'f:capacity':
                  .: {}
                  'f:storage': {}
                'f:local':
                  .: {}
                  'f:fsType': {}
                  'f:path': {}
                'f:nodeAffinity':
                  .: {}
                  'f:required': {}
                'f:persistentVolumeReclaimPolicy': {}
                'f:storageClassName': {}
                'f:volumeMode': {}
          - manager: kube-controller-manager
            operation: Update
            apiVersion: v1
            time: '2022-08-02T19:46:50Z'
            fieldsType: FieldsV1
            fieldsV1:
              'f:status':
                'f:phase': {}
            subresource: status
      spec:
        capacity:
          storage: 2008Mi
        local:
          path: /mnt/local-storage/local-sc/ccw-0.0.0003
          fsType: xfs
        accessModes:
          - ReadWriteOnce
        persistentVolumeReclaimPolicy: Delete
        storageClassName: local-sc
        volumeMode: Filesystem
        nodeAffinity:
          required:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/hostname
                    operator: In
                    values:
                      - worker7
      status:
        phase: Available
      
      PVC Dump:
      
      StorageClass Dump (if StorageClass used by PV/PVC):
      
      Additional info:
      
      LV.yaml
      apiVersion: "local.storage.openshift.io/v1"
      kind: "LocalVolume"
      metadata:
        name: "local-disks"
        namespace: "openshift-local-storage"
      spec:
        nodeSelector:
          nodeSelectorTerms:
          - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                - worker5
                - worker7
        storageClassDevices:
          - storageClassName: "local-sc"
            volumeMode: Filesystem
            fsType: xfs
            devicePaths:
              - /dev/disk/by-path/ccw-0.0.0003
              - /dev/disk/by-path/ccw-0.0.0004
              - /dev/disk/by-path/ccw-0.0.0005
              - /dev/disk/by-path/ccw-0.0.0006
              - /dev/disk/by-path/ccw-0.0.0007
              - /dev/disk/by-path/ccw-0.0.0008
              - /dev/disk/by-path/ccw-0.0.0009

            jdobson@redhat.com Jonathan Dobson
            jdobson@redhat.com Jonathan Dobson
            Wei Duan Wei Duan
            Lakshmi Ravichandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: