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

[2166512] VM can't start because of requests/limits CPU number mismatch after adding the overallocated one

    XMLWordPrintable

Details

    • Urgent

    Description

      Description of problem:
      After the environment upgrading to OCP + CNV 4.12.1, the VMs with limits/requests resources specified can't start.

      memory:
      hugepages:
      pageSize: 1Gi
      resources:
      limits:
      cpu: "4"
      memory: 8Gi
      requests:
      cpu: "4"
      memory: 8Gi

      Logs generated from virtualmachine-controller is as follows:

      Error creating pod: Pod "virt-launcher-rhel8-ngu-2-5gmm4" is invalid: spec.containers[0].resources.requests: Invalid value: "5": must be less than or equal to cpu limit

      The overhead(1 CPU) was added to the virt-launcher pod(4+1=5). However, it was only added to the requests while not to the limits, as we're getting denied by the validating webhook:

      Error "spec.template.spec.domain.resources.requests.cpu or spec.template.spec.domain.resources.limits.cpu must be equal when DedicatedCPUPlacement is true " for field "spec.template.spec.domain.cpu.dedicatedCpuPlacement".

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

      How reproducible:
      100%

      Steps to Reproduce:
      1. Upgrade OCP + CNV env from version 4.11.* to 4.12.1.
      2. Try to start a VM

      Actual results:
      The VM is always in 'starting' status, from the log, it's found the requests/limits CPU number mismatch after adding the overallocated cpu.

      Expected results:
      The overallocated CPU should be added to both requests and limits of the vmi pod
      .
      Additional info:

      Attachments

        Activity

          People

            lpivarc Luboslav Pivarc
            ngu@redhat.com Nini Gu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: