Bug 2236422 - Virtual machine export is not working on Quota defined namespace
Summary: Virtual machine export is not working on Quota defined namespace
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.13.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.13.5
Assignee: Alexander Wels
QA Contact: dalia
URL:
Whiteboard:
Depends On:
Blocks: 2247200
TreeView+ depends on / blocked
 
Reported: 2023-08-31 08:42 UTC by nijin ashok
Modified: 2023-11-28 13:45 UTC (History)
5 users (show)

Fixed In Version: v4.13.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2247200 (view as bug list)
Environment:
Last Closed: 2023-11-28 13:45:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 10391 0 None Merged Allow setting of requests/limits on VMExport pod 2023-10-31 11:59:25 UTC
Github kubevirt kubevirt pull 10402 0 None Merged [release-1.0] Allow setting of requests/limits on VMExport pod 2023-09-13 12:14:25 UTC
Github kubevirt kubevirt pull 10421 0 None Merged [release-0.59] Add request and limits to vm export pod 2023-09-13 12:15:10 UTC
Red Hat Issue Tracker CNV-32692 0 None None None 2023-09-06 13:06:33 UTC
Red Hat Knowledge Base (Solution) 7031322 0 None None None 2023-08-31 10:18:03 UTC

Description nijin ashok 2023-08-31 08:42:10 UTC
Description of problem:

The namespace has a quota defined:

~~~
oc describe quota  -n test-cnv
Name:         compute-resources
Namespace:    test-cnv
Resource      Used  Hard
--------      ----  ----
requests.cpu  500m  10
~~~

Tried to export the VM:

~~~
# virtctl vmexport create rhel8-hssasrpx63aq4yv2-export --vm=rhel8-hssasrpx63aq4yv2
~~~

The  `virt-export-` pod creation is failing with the error below:

~~~
E0831 08:27:10.088120       1 util.go:72] pods "virt-export-rhel8-hssasrpx63aq4yv2-export" is forbidden: failed quota: compute-resources: must specify requests.cpu for: rhel8-hssasrpx63aq4yv2-export
~~~

It doesn't set default limits/requests for memory and cpu or there is no option to pass the values. 

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

OpenShift Virtualization   4.13.3

How reproducible:

100%

Steps to Reproduce:
1. Define a quota for the namespace.
2. Try to export a VM in this namespace.
3. The virt-export-` creation will fail and the quota error will be reported in the virt-launcher pod.



Actual results:

Virtual machine export is not working on Quota defined namespace

Expected results:

It should set requests/limits for memory and cpu to the virt-export pod.

Additional info:

Comment 1 dalia 2023-11-01 08:51:37 UTC
verified on OpenShift Virtualization      4.13.5:

1. Create a quota

apiVersion: v1
kind: ResourceQuota
metadata:
  name: mem-cpu-demo
spec:
  hard:
    requests.cpu: "10"


2. create a vm 

3. virtctl vmexport create rhel8-hssasrpx63aq4yv2-export --vm=rhel8-hssasrpx63aq4yv2

4. wait for vmexport to be ready

5. check virt-export pod resources

6. oc describe quota - check that the resources values of the pod match to quota

Comment 7 errata-xmlrpc 2023-11-28 13:45:20 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.13.6 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:7522


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