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

memoryOvercommit should be ignored when memory.requests is used in VM spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • CNV v4.20.0
    • None
    • CNV Virt-Node
    • None
    • Quality / Stability / Reliability
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None

      Description of problem:

      When creating a VirtualMachine with memory defined under resources.requests and memory.limits, the global memoryOvercommit setting is still applied.
      
      
      # Overcommit in hco:
        "memoryOvercommitPercentage": 150
      
      
      # Memory request/limits in VM spec:
              resources:
                limits:
                  memory: 1Gi
                requests:
                  memory: 1Gi
      
      # Memory request/limits in virt-launcher pod:
          resources:
            limits:
              memory: 1294Mi
            requests:
              memory: "998943402"
      

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

      4.20

      How reproducible:

      100%

      Steps to Reproduce:

      1. set "memoryOvercommitPercentage" greater than 100
      2. create VM with memory.request in the spec instead of memory guest
      3. 
      

      Actual results:

      virt-launcher pod calculates the request memory based on overcommit ratio setting

      Expected results:

      Overcommit ratio should only affect VMs with memory.guest

      Additional info:

      When memory.limits is used and memoryOvercommitPercentage < 100 is applied, the pod fails to start with error:
      
      
      spec.containers[0].resources.requests: Invalid value: "2418Mi":
              must be less than or equal to memory limit of 1394Mi'
      
      
      

              iholder@redhat.com Itamar Holder
              dshchedr@redhat.com Denys Shchedrivyi
              Denys Shchedrivyi Denys Shchedrivyi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: