Bug 2244869

Summary: MTQ does not work with Auto Memory Limits
Product: Container Native Virtualization (CNV) Reporter: Denys Shchedrivyi <dshchedr>
Component: VirtualizationAssignee: Barak <bmordeha>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: high    
Version: 4.14.0CC: acardace, bmordeha
Target Milestone: ---   
Target Release: 4.14.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.14.1.rhel9-8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-07 15:02:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Denys Shchedrivyi 2023-10-18 16:31:44 UTC
Description of problem:
 Managed-Tenant-Quota does not help with increasing quotas for VM that set the memory lmits automatically (using Kubevirt featureGate: `AutoResourceLimitsGate`)

 The POD has memory requests and limits:

> $ oc get pod virt-launcher-vm-fedora-guest-memory-96ck7 -o json | jq .spec.containers[0].resources
> {
>   "limits": {
>     "memory": "2536Mi"
>   },
>   "requests": {
>     "memory": "1268Mi"
>   }
> }

 And VMMRQ is big enough:

> $ oc get vmmrq my-vmmrq-big -o json |  jq .spec
> {
>   "additionalMigrationResources": {
>     "limits.memory": "5Gi",
>     "requests.memory": "5Gi"
>   }
> }

But migration is still in Pending state:

> $ oc get vmim
> NAME                        PHASE     VMI
> kubevirt-migrate-vm-dcrvp   Pending   vm-fedora-guest-memory



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

How reproducible:
100%

Steps to Reproduce:
1. enable FG in kubevirt: AutoResourceLimitsGate
2. create VM with memory guest (without limits)
3. create resourcequota
4. create vmmrq
5. migrate VM

Actual results:
 Migration is in Pending state


Expected results:
 Migration completed


Additional info:

 Perhaps, this issue related to bug 2241953

Comment 1 Denys Shchedrivyi 2023-11-27 19:17:26 UTC
Verified on CNV-v4.14.1.rhel9-62, MTQ with Auto Memory Limits (AutoResourceLimitsGate) works well

Comment 8 errata-xmlrpc 2023-12-07 15:02:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.14.1 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:7704