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

[4.18] LSO stuck while deletion

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      LSO stuck while deletion    

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

      Local Storage 4.17.0-202412170235

      How reproducible:

       Create local storage and delete it   

      Steps to Reproduce:

          1. Create the following local storage, e.g. mariadb.yaml
      [Update your device path: /dev/disk/by-id/wwn-0x62cea7f08df680002d419c29129dccd8]
      apiVersion: v1
      kind: Namespace
      metadata:
        name: mariadb-db
      ---
      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:
                - worker-2
        storageClassDevices:
          - storageClassName: local-sc
            volumeMode: Filesystem
            fsType: ext4
            devicePaths:
              - /dev/disk/by-id/wwn-0x62cea7f08df680002d419c29129dccd8
      ---
      kind: PersistentVolumeClaim
      apiVersion: v1
      metadata:
          name: mariadb-persistent-storage
          namespace: mariadb-db
      spec:
          storageClassName: local-sc
          accessModes: [ "ReadWriteOnce" ]
          volumeMode: Filesystem
          resources:
            requests:
              storage: 10Gi
      ---
      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: mariadb-custom-config
        namespace: mariadb-db
      data:
        custom.conf: |
              # This group is read both both by the client and the server
              # use it for options that affect everything
              #
              [client-server]
              #
              # include all files from the config directory
              #
              !includedir /etc/my.cnf.d
              port=3306
              ssl=0
              [mysqld]
              innodb_file_per_table=1
              innodb_flush_method=O_DIRECT
              innodb_adaptive_flushing=1
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: mariadb-deployment
        namespace: mariadb-db
      spec:
        selector:
          matchLabels:
            app: mariadb
        template:
          metadata:
            labels:
              app: mariadb
              type: mariadb-database-server
          spec:
            nodeSelector:
              kubernetes.io/hostname: "worker-2"
            terminationGracePeriodSeconds: 10
            containers:
            - name: mariadb
              # docker.io/centos/mariadb-103-centos8:latest - rate limit issue
              image: quay.io/ebattat/mariadb-103-centos8
              imagePullPolicy: "IfNotPresent"
              ports:
              - containerPort: 3306
              resources:
                requests:
                  cpu: 10m
                  memory: 16Gi
                limits:
                  cpu: 4
                  memory: 16Gi
              env:
                 - name: MYSQL_USER
                   value: "test"
                 - name: MYSQL_PASSWORD
                   value: "test"
                 - name: MYSQL_ROOT_PASSWORD
                   value: "mysql"
              volumeMounts:
                - name: mariadb-custom-config
                  mountPath: /etc/my.cnf
                  subPath: custom.conf #should be the name used in the ConfigMap
                - name: mariadb-persistent-storage
                  mountPath: /var/lib/mysql
                  readOnly: false
            volumes:
              - name: mariadb-custom-config
                configMap:
                  name: mariadb-custom-config
              - name: mariadb-persistent-storage
                persistentVolumeClaim:
                  claimName: mariadb-persistent-storage
      ---
      apiVersion: v1
      kind: Service
      metadata:
        name: mariadb-deployment
        namespace: mariadb-db
      spec:
        selector:
          app: mariadb
        ports:
          - protocol: TCP
            port: 3306
            targetPort: 3306
      2. $ oc create -f mariadb.yaml
      3. $ oc delete -f mariadb.yaml
      4. verify LSO is stuck while deletion
      ebattat:hammerdb-pod-mariadb-lso-2025-01-12-14-56-33 % oc delete -f mariadb.yaml
      namespace "mariadb-db" deleted
      localvolume.local.storage.openshift.io "local-disks" deleted
      persistentvolumeclaim "mariadb-persistent-storage" deleted
      configmap "mariadb-custom-config" deleted
      deployment.apps "mariadb-deployment" deleted
      service "mariadb-deployment" deleted
      
      ** All working fine till LSO 4.16
      ** The deletion is worked when adding --wait=false
      oc delete -f mariadb.yaml --wait=false

      Actual results:

         LSO deletion is stuck

      Expected results:

          LSO Should be deleted

      Additional info:

       The deletion didnt finish 

              rbednar@redhat.com Roman Bednar
              ebattat@redhat.com Eli Battat
              Wei Duan Wei Duan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: