Bug 2169272

Summary: [4.11] VM with HotPluggable disks and namespace defined LimitRanges won't restart due to hardcoded Limits
Product: Container Native Virtualization (CNV) Reporter: Rafael Rosa <rdeolive>
Component: StorageAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: Yan Du <yadu>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.11.3CC: akalenyu
Target Milestone: ---   
Target Release: 4.11.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: v4.11.4-37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-30 15:37:44 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 Rafael Rosa 2023-02-13 06:42:15 UTC
**IMPORTANT:** This BZ was created as Customer stated that solution provided on BZ 2159096 isn't satisfactory for the specified use-case on JIRA CNV-22529 and related SFDC case (please refer to Comment #30 on SFDC).

I'll keep the BZ details the same as previous BZ 2159096, but please let me know if more details are required.

=============================================================================

Description of problem:

VM with HotPluggable disks and namespace defined LimitRanges won't restart due to hardcoded Limits

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

How reproducible:
Always

Steps to Reproduce:
1. setting specific LimitRange on NameSpace/core on an RHOCP cluster
apiVersion: v1
kind: LimitRange
metadata: 
    name: resource-limits
spec: 
    limits: 
      - type: Container
        maxLimitRerquestRatio: 
            memory: "1"
        max: 
            ephemeral-storage: "20Gi"
            memory: "32Gi"
        min: 
            memory: "32Mi"
        default: 
            ephemeral-storage: "200Mi"
            memory: "32Mi"
        defaultRequest: 
            ephemeral-storage: "50Mi"
    - type: openshift.io/Image
        max: 
            storage: 1Gi
2. vms which had additional dataVolumes and the hotpluggable option set to true couldn't restart properly with the error.
3.

Actual results:
Warning FailedCreate 0m27s virtualmachine-controller Error creating attachment pod: pods "hp-volume-4d7hc" is forbidden: [minimum memory usage per Container is 32Mi, but request is 2M, memory max limit to request ratio per Container is 1, but provided ratio is 40.000000]


Expected results:
VMs and hotplug works well


Additional info:
The suspicion is that this is caused by HotplugAttachmentPod, since in the upstream code the resource requests and limits seem to be hard coded.

Comment 4 Yan Du 2023-04-27 15:00:29 UTC
Verify on CNV-v4.11.4-86

Comment 10 errata-xmlrpc 2023-05-30 15:37:44 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 (OpenShift Virtualization 4.11.4 Images), 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/RHEA-2023:3352