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

[2241953] MTQ does not work with LimitRanges

XMLWordPrintable

    • High
    • No

      Description of problem:
      Managed-Tenant-Quota does not help with increasing quotas for VM that set the memory/cpu limits using LimitRange.

      I've LimitRange which set the limits to VM automatically:

      > $ oc describe limitrange
      > Name: resource-limits
      > Namespace: test-mtq
      > Type Resource Min Max Default Request Default Limit Max Limit/Request > Ratio
      > ---- -------- — — --------------- ------------- -----------------------
      > Container cpu - 2 100m 1 -
      > Container memory - 2Gi 1Gi 1536Mi -

      The POD has requests and limits (because of LimitRange):

      $ oc get pod virt-launcher-vm-fedora-cpu-mem-1-f4rtp -o json | jq .spec.containers[0].resources
      > {
      > "limits":

      { > "cpu": "1", > "memory": "1536Mi" > }

      ,
      > "requests":

      { > "cpu": "1", > "memory": "1268Mi" > }

      > }

      and there is a VMMRQ:

      > $ oc get vmmrq my-vmmrq -o json | jq .spec
      > {
      > "additionalMigrationResources":

      { > "limits.cpu": 4, > "limits.memory": "4.5Gi", > "requests.cpu": 4, > "requests.memory": "4.5Gi" > }

      > }

      But migration is still in Pending state:

      > $ oc get vmim
      > NAME PHASE VMI
      > kubevirt-migrate-vm-52x2p Pending vm-fedora-cpu-mem-1

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

      How reproducible:
      100%

      Steps to Reproduce:
      1. create LimitRange
      2. create resourcequota with request and limits
      3. create VM with cpu request, but without limits
      4. create vmmrq with resource and limits
      5. migrate VM

      Actual results:
      Migration is in Pending state

      Expected results:
      Migration completed

      Additional info:

              bmordeha@redhat.com Barak Mordehai
              dshchedr@redhat.com Denys Shchedrivyi
              Kedar Bidarkar Kedar Bidarkar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: