Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-41776

Console is showing incorrect value's for disks attached to VMs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • CNV v4.17.0
    • CNV v4.14.5
    • CNV User Interface
    • None
    • Incidents & Support
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.99.0.rhel9-533
    • Low
    • No

      Description of problem:

       

      If we create a PVC with 500 Gi size that ends with "000" and attach to Virtual Machine, it is getting converted to "k". This will reflect incorrect value in console. 

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

      openshift-cnv                          kubevirt-hyperconverged-operator.v4.14.5

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create a Disk/PVC with size that ends with "000" for example 500 Gib.
      
      # cat /tmp/pvc.yaml
      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: test-pvc
        namespace: nijin-cnv
      spec:
        accessModes:
        - ReadWriteMany
        resources:
          requests:
            storage: 536870912000
        storageClassName: ocs-external-storagecluster-ceph-rbd
        volumeMode: Block
      
      # oc create -f /tmp/pvc.yaml
      persistentvolumeclaim/test-pvc created
      
      # oc get pvc test-pvc -o yaml |yq '.spec'
      accessModes:
        - ReadWriteMany
      resources:
        requests:
          storage: 536870912k     <====
      storageClassName: ocs-external-storagecluster-ceph-rbd
      volumeMode: Block
      volumeName: pvc-84915b3f-5366-41ee-a6dc-bfc82f6336e1 
      
      2. If we add this PVC to the VM disk, the console is showing 512.00 KiB size.
      

      Actual results:

      The console is showing incorrect size as 512.00 KiB for 500 GB PVC.

      Expected results:

      kubevirt plugin is taking only 536870912 bytes and not 536870912000 and hence not  considering the 'k' while converting the unit. It should show correct disk size.

      Additional info:

       

              aturgema Aviv Turgeman
              rhn-support-ymotiyel Yash Motiyele
              Guohua Ouyang Guohua Ouyang
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: