Bug 2159097 - [4.12]VM with HotPluggable disks and namespace defined LimitRanges won't restart due to hardcoded Limits
Summary: [4.12]VM with HotPluggable disks and namespace defined LimitRanges won't rest...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.12.1
Assignee: Alex Kalenyuk
QA Contact: Yan Du
URL:
Whiteboard:
Depends On: 2159096
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-08 14:04 UTC by Yan Du
Modified: 2023-02-28 20:06 UTC (History)
2 users (show)

Fixed In Version: virt-controller v4.12.1-3, CNV v4.12.1-13
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2159096
Environment:
Last Closed: 2023-02-28 20:06:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 9034 0 None open [release-0.58] Take QoS into account in hotplug pod resource requirements 2023-01-08 14:13:15 UTC
Red Hat Issue Tracker CNV-24079 0 None None None 2023-01-08 14:05:16 UTC
Red Hat Product Errata RHEA-2023:1023 0 None None None 2023-02-28 20:06:39 UTC

Description Yan Du 2023-01-08 14:04:39 UTC
+++ This bug was initially created as a clone of Bug #2159096 +++

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.

--- Additional comment from Yan Du on 2023-01-08 14:03:40 UTC ---

The bug is clone from https://issues.redhat.com/browse/CNV-22529 (CNV-4.10)

Comment 1 Yan Du 2023-02-03 08:53:00 UTC
Test on CNV v4.12.1-22, issue has been fixed.

Verified steps as https://bugzilla.redhat.com/show_bug.cgi?id=2159096#c2

$ oc get pod
NAME                            READY   STATUS    RESTARTS   AGE
hp-volume-4zbtz                 1/1     Running   0          38s
virt-launcher-vm-cirros-fhkgx   1/1     Running   0          3m1s

Comment 7 errata-xmlrpc 2023-02-28 20:06:27 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.12.1 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:1023


Note You need to log in before you can comment on or make changes to this bug.