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

[2163460] Can't set resources.requests.memory when using instance type

XMLWordPrintable

    • 3
    • CNV Infra 231
    • Medium
    • None

      Created attachment 1939992 [details]
      vm with memory conflict

      Description of problem:
      When using instance type and setting "spec.template.spec.domain.resources.requests.memory" we get a "VM field conflicts" error. this prevents the use of other parameters of InstanceType that require those fields such as: "guestMappingPassthrough", "IOThreadsPolicy"

      EDIT: this bug will used to follow adding `guestMappingPassthrough` to the list of blocked instance type attributes

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

      How reproducible:
      100%

      Steps to Reproduce:
      1. Create an InstanceType with "guestMappingPassthrough" + "IOThreadsPolicy"
      2. Create a VM with the InstanceType

      Actual results:
      When trying to set "spec.template.spec.domain.resources.requests.memory":

      HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"admission webhook \\"virtualmachine-validator.kubevirt.io
      " denied the request: VM field conflicts with selected Instancetype","reason":"Invalid","details":{"causes":[

      {"reason":"FieldValueInvalid","message":"VM field conflicts with selected Instancetype","field":"spec.template.spec.domain.resources.requests.memory"}

      ]},"code":422}\n'

      When trying to set "guestMappingPassthrough" + "IOThreadsPolicy":

      HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"admission webhook \\"virtualmachine-validator.kubevirt.io
      " denied the request: spec.template.spec.domain.resources.requests.memory \'0\' must be equal to or larger than page size spec.template.spec.domain.hugepages.size \'1Gi\', spec.template.spec.domain.cpu.dedicatedCpuPlacement must be set to true when NUMA topology strategy is set in spec.template.spec.domain.cpu.numa.guestMappingPassthrough, Invalid IOThreadsPolicy (demi-io-thread-policy)","reason":"Invalid","details":{"causes":[

      {"reason":"FieldValueInvalid","message":"spec.template.spec.domain.resources.requests.memory \'0\' must be equal to or larger than page size spec.template.spec.domain.hugepages.size \'1Gi\'","field":"spec.template.spec.domain.resources.requests.memory"}

      ,

      {"reason":"FieldValueInvalid","message":"spec.template.spec.domain.cpu.dedicatedCpuPlacement must be set to true when NUMA topology strategy is set in spec.template.spec.domain.cpu.numa.guestMappingPassthrough","field":"spec.template.spec.domain.cpu.numa.guestMappingPassthrough"}

      ,

      {"reason":"FieldValueInvalid","message":"Invalid IOThreadsPolicy (demi-io-thread-policy)","field":"spec.template.spec.domain.ioThreadsPolicy"}

      ]},"code":422}\n

      Expected results:
      VM is created

      Additional info:

              rhn-support-lyarwood Lee Yarwood
              rhn-support-rkishner Roni Kishner
              Ondrej Pokorny
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: