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

topolvm-node crash loopback errors due to default device-class not detected properly

XMLWordPrintable

    • Moderate
    • No
    • 3
    • OCPEDGE Sprint 247
    • 1
    • False
    • Hide

      None

      Show
      None
    • It is now possible to define a default deviceClass that is only present on one Node. Previously it had to be present on all Nodes.
    • Bug Fix
    • In Progress

      Description of problem:

      There is bug preventing lvms operator to properly detect number of default device-classes.

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

       

      How reproducible:

      always when specific config used.

      Steps to Reproduce:

      1.Apply config:
      
      apiVersion: lvm.topolvm.io/v1alpha1
      kind: LVMCluster
      metadata:
       finalizers:
         - lvmcluster.topolvm.io
       name: lvmcluster
       namespace: openshift-storage
      spec:
        storage:
          deviceClasses:
            - default: true
              deviceSelector:
                paths:
                  - /dev/disk/by-id/scsi-3300xxxxabcde
              fstype: xfs
              name: vg1
              nodeSelector:
                nodeSelectorTerms:
                  - matchExpressions:
                      - key: topology.topolvm.io/node
                        operator: In
                        values:
                          - n1.openshift.fqdn
              thinPoolConfig:
                name: thin-pool-1
                overprovisionRatio: 10
                sizePercent: 90
            - default: false
              deviceSelector:
                paths:
                  - /dev/disk/by-id/ata-TOSHIBA_MQ0abcdef
              fstype: xfs
              name: vg2
              nodeSelector:
                nodeSelectorTerms:
                  - matchExpressions:
                      - key: topology.topolvm.io/node
                        operator: In
                        values:
                          - n2.openshift.fqdn
              thinPoolConfig:
                name: thin-pool-1
                overprovisionRatio: 10
                sizePercent: 90
            - default: false
              deviceSelector:
                paths:
                  - /dev/disk/by-id/ata-TOSHIBA_MQ0xxxyaT
              fstype: xfs
              name: vg3
              nodeSelector:
                nodeSelectorTerms:
                  - matchExpressions:
                      - key: topology.topolvm.io/node
                        operator: In
                        values:
                          - n3.openshift.fqdn
              thinPoolConfig:
                name: thin-pool-1
                overprovisionRatio: 10
                sizePercent: 90
      
      
      

      Actual results:

      topolvm-node pods failing because of wrong check condition

      Expected results:

      topolvm-node pods running with config presented

      Additional info:

      The issue is cause by wrong condition in file:

      https://github.com/openshift/lvm-operator/blob/main/vendor/github.com/topolvm/topolvm/lvmd/device_class_manager.go

       

      In line 135 there is a condition:

      if countDefault != 1 {

      which should be changed to:

      if countDefault > 1 {

              rh-ee-jmoller Jakob Moeller (Inactive)
              pdw2-kmd Przemyslaw Dmochowski (Inactive)
              Rahul Deore Rahul Deore
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: