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

[2214362] VM with containerDisk does not run when "Auto CPU Limit" feature enabled and ResourceQuota has limits.cpu=1

XMLWordPrintable

    • CNV Virtualization Sprint 238, CNV Virtualization Sprint 239, CNV Virtualization Sprint 240
    • Important
    • None

      Description of problem:
      After enabling autoCPULimitNamespaceLabelSelector and creating resourceQuota with `limits.cpu=1` can't run VMs with container disks:

      > Warning FailedCreate 3s (x2 over 6s) virtualmachine-controller (combined from similar events): Error creating pod: pods "virt-launcher-vm-fedora-hjn9j" is forbidden: exceeded quota: quota-limit-1, requested: limits.cpu=1010m, used: limits.cpu=0, limited: limits.cpu=1

      autoCPULimitNamespaceLabelSelector automatically set the cpu limit to "1" for "compute" container on the POD, but "containerDisk" requires additional "10m" of cpu so the POD exceeds the allowed limit and can't be created.

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

      How reproducible:
      100%

      Steps to Reproduce:
      1. enable autoCPULimitNamespaceLabelSelector
      2. create resourceQuota with cpu limit 1
      3. create VM with container disk

      Actual results:
      VMI stuck in Pending state, can't create POD

      Expected results:
      VMI succesfully started

      Additional info:
      also due to this limitation, for example if I set the cpu limit to 5, I can only run 4 VMs with container disk in that namespace.

      > $ oc get vmi
      > NAME AGE PHASE IP NODENAME READY
      > vm-fedora 5m55s Running 10.131.1.191 virt-den-414-zzpcr-worker-0-hk7vb True
      > vm-fedora-2 5m51s Running 10.128.2.69 virt-den-414-zzpcr-worker-0-b54wh True
      > vm-fedora-3 5m40s Running 10.129.2.128 virt-den-414-zzpcr-worker-0-hp7rc True
      > vm-fedora-4 41s Running 10.128.2.70 virt-den-414-zzpcr-worker-0-b54wh True
      > vm-fedora-5 9s Pending False

      > $ oc get resourcequota
      > NAME AGE REQUEST LIMIT
      > cpi-quota 7m20s requests.cpu: 404m/1 limits.cpu: 4040m/5

              jelejosne Jed Lejosne
              dshchedr@redhat.com Denys Shchedrivyi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: