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

Adding disk with "PVC" source is failing with error webhook "mutatevirtualmachines.kubemacpoolio"denied the request: quantities must match the regular expression

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • CNV v4.15.3
    • None
    • CNV User Interface
    • None
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.15.3.rhel9-159
    • ---
    • ---
    • Medium
    • No

      Description of problem:

      From the UI , add a disk to the VM and select source as "PVC (creates PVC)".  On clicking "Save", below error is reported:

      admission
       webhook "mutatevirtualmachines.kubemacpool.io" denied the request: 
      quantities must match the regular expression 
      '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'

      If we just edit the textbox and add the same value, the disk creation works. Please also refer the attached screen recording video.

      The issue looks to be because, the UI is passing "GiB" instead of "Gi" in DataVolumeTemplates. I can see that in the browser console logs:

      5
      {…}
      metadata
      {…}
      name
      "rhel8-blush-weasel-89-disk-black-cow-74"
      spec
      {…}
      preallocation
      false
      source
      {…}
      pvc
      {…}
      name
      "rhel8-blush-weasel-89-disk-white-perch-58"
      namespace
      "nijin-cnv"
      storage
      {…}
      resources
      {…}
      requests
      {…}
      storage
      "30GiB"               <====
      storageClassName
      "ocs-external-storagecluster-ceph-rbd"

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

      OpenShift Virtualization   4.15.2

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create a disk from VM and select source as "PVC (creates PVC)"
      2. Select any of the existing PVC.
      3. While saving, below error is reported:
      
      admission webhook "mutatevirtualmachines.kubemacpool.io" denied the request: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$' 

      Actual results:

      Adding disk with "PVC" source is failing with error webhook "mutatevirtualmachines.kubemacpoolio"denied the request: quantities must match the regular expression

      Expected results:

      Add disk should work.

      Additional info:

       

              aturgema Aviv Turgeman
              rhn-support-nashok Nijin Ashok
              Guohua Ouyang Guohua Ouyang
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: