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

[2149201] Incorrect pending changes warning about memory and CPU while starting a VM in a namespace with limitranges

XMLWordPrintable

    • Medium

      Description of problem:

      The namespace has got below limits defined:

      ~~~
      oc describe limits
      Name: resource-limits
      Namespace: default
      Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio
      ---- -------- — — --------------- ------------- -----------------------
      Container memory - 5Gi 1Gi 3Gi -
      Container cpu - 2 2 2 -
      ~~~

      A VM was created from the OpenShift UI from the default template. The template doesn't have any limits defined. Immediately after starting the VM, the below warning message was shown in the console:

      ~~~
      Pending Changes
      The following areas have pending changes that will be applied when this VirtualMachine is restarted.
      Details
      CPU | Memory
      ~~~

      There were no manual CPU/Memory changes. However, since there are limits defined on the namespace, it will add the default limits in the VMI object.

      ~~~
      oc get vmi rhel6-continuing-damselfly -o yaml |yq -y '.spec.domain.resources'
      limits:
      cpu: '2'
      memory: 3Gi
      requests:
      cpu: '2'
      memory: 2Gi
      ~~~

      It looks like this update is triggering this warning although this was already applied to the virt-launcher pod.

      ~~~
      oc get pod virt-launcher-rhel6-continuing-damselfly-s8ckb -o yaml |yq -y '.spec.containers[0].resources'
      limits:
      cpu: '2'
      devices.kubevirt.io/kvm: '1'
      devices.kubevirt.io/tun: '1'
      devices.kubevirt.io/vhost-net: '1'
      memory: 3313Mi
      requests:
      cpu: '2'
      devices.kubevirt.io/kvm: '1'
      devices.kubevirt.io/tun: '1'
      devices.kubevirt.io/vhost-net: '1'
      ephemeral-storage: 50M
      memory: 2289Mi
      ~~~

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

      OCP 4.11.4
      OpenShift Virtualization 4.11.0

      How reproducible:

      100%

      Steps to Reproduce:

      1. Define limits on the namespace.
      2. Create a VM from the default template and start the VM.
      3. Immediately after starting the VM, the below warning is shown in the UI:

      Pending Changes
      The following areas have pending changes that will be applied when this VirtualMachine is restarted.

      Actual results:

      Incorrect pending changes warning about memory and CPU while starting a VM in a namespace with limitranges.

      Expected results:

      Additional info:

            sgott@redhat.com Stuart Gott
            rhn-support-nashok Nijin Ashok
            Guohua Ouyang Guohua Ouyang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: