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

[4.18] oc adm top pvc command should display as per the no of volume counts

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required

      Description of problem:

      oc adm top pvc command should display as per the no of volume counts

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

      4.18.0-0.nightly-2024-10-29-112337

      How reproducible:

      Always

      Steps to Reproduce:

          1. Install AWS/GCP/Azure cluster which has EFS/GCP filestore/Azure 
             file store provisioners enabled
             ex: Profile: ipi-on-gcp/versioned-installer-filestore-CSI-ci,  
                 ipi-on-aws/versioned-installer-efs_operator-ci     
          2. Create pvc, daemonset, Write data inside the volume
          3. Check the no of volume counts 

      Actual results:

      To get oc adm top pvc command feature enabled pull the oc repo mentioned in: https://issues.redhat.com/browse/STOR-2040
      
      oc adm top pvc command is displaying the no of volume counts == to the total no of volumes attached to nodes
      
      ./oc adm top pvc --insecure-skip-tls-verify=true -n default
      NAMESPACE NAME        USAGE(%) 
      default   mypvc-fs-ds 0.30     
      default   mypvc-fs-ds 0.30     
      default   mypvc-fs-ds 0.30

      Expected results:

      It should display anly one 1 volume as there exists only 1 volume
      
      oc get pvc -n default -o wide 
      NAME          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS    VOLUMEATTRIBUTESCLASS   AGE   VOLUMEMODE
      mypvc-fs-ds   Bound    pvc-28e24b8c-0a31-4c0a-b217-61437e4cf78b   1Ti        RWX            filestore-csi   <unset>                 75m   Filesystem
      
      oc get pod -n default -o wide 
      NAME         READY   STATUS    RESTARTS   AGE   IP            NODE                                    NOMINATED NODE   READINESS GATES
      myds-6x7cc   1/1     Running   0          75m   10.128.2.91   ropatil-1030gcp1-k5wg9-worker-c-mmtg8   <none>           <none>
      myds-6x8vg   1/1     Running   0          75m   10.131.0.21   ropatil-1030gcp1-k5wg9-worker-b-n5hjv   <none>           <none>
      myds-bcrsl   1/1     Running   0          75m   10.129.2.16   ropatil-1030gcp1-k5wg9-worker-a-d5njm   <none>           <none>
      
      oc get pv
      NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                 STORAGECLASS    VOLUMEATTRIBUTESCLASS   REASON   AGE
      pvc-28e24b8c-0a31-4c0a-b217-61437e4cf78b   1Ti        RWX            Delete           Bound    default/mypvc-fs-ds   filestore-csi   <unset>                          73m

      Additional info:

      pvc_ds.yaml
      
      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: mypvc-fs-ds
        namespace: default
      spec:
        accessModes:
          - ReadWriteMany
        volumeMode: Filesystem
        storageClassName: filestore-csi
        resources:
          requests:
            storage: 1Gi
      ---
      apiVersion: apps/v1
      kind: DaemonSet
      metadata:
        name: myds
        namespace: default
      spec:
        selector:
          matchLabels:
            app: myapp-abgi7vfm
        template:
          metadata:
            labels:
              app: myapp-abgi7vfm
          spec:
            containers:
            - image: quay.io/openshifttest/hello-openshift@sha256:56c354e7885051b6bb4263f9faa58b2c292d44790599b7dde0e49e7c466cf339
              imagePullPolicy: IfNotPresent
              name: myds
              ports:
              - containerPort: 80
              volumeMounts:
              - mountPath: "/mnt/storage"
                name: local
            volumes:
            - name: local
              persistentVolumeClaim:
                claimName: mypvc-fs-ds
      
      oc exec pod/myds-6x7cc -n default -i -- sh -c "/bin/dd if=/dev/zero of=/mnt/storage/1.txt bs=1G count=1"
      oc exec pod/myds-6x8vg -n default -i -- sh -c "/bin/dd if=/dev/zero of=/mnt/storage/2.txt bs=1G count=1"
      oc exec pod/myds-bcrsl -n default -i -- sh -c "/bin/dd if=/dev/zero of=/mnt/storage/3.txt bs=1G count=1"
      oc exec pod/myds-6x8vg -n default -i -- sh -c "ls -lrth /mnt/storage/"
      drwx------. 2 root root  16K Oct 30 12:00 lost+found
      -rw-r--r--. 1 root root 1.0G Oct 30 12:06 1.txt
      -rw-r--r--. 1 root root 1.0G Oct 30 12:06 2.txt
      -rw-r--r--. 1 root root 1.0G Oct 30 12:06 3.txt
      
      Discussion: https://redhat-internal.slack.com/archives/GK0DA0JR5/p1730290471623309?thread_ts=1730284398.158449&cid=GK0DA0JR5

              rhn-support-gmeghnag Gabriel Meghnagi
              ropatil@redhat.com Rohit Patil
              Rohit Patil Rohit Patil
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: