Bug 2219800 - PreferredStorageClassName - PVC required
Summary: PreferredStorageClassName - PVC required
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Infrastructure
Version: 4.14.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.14.0
Assignee: Lee Yarwood
QA Contact: Roni Kishner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-05 12:08 UTC by Roni Kishner
Modified: 2023-11-08 14:06 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:05:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt issues 10025 0 None open `PreferredStorageClassName` only used when `vm.Spec.DataVolumeTemplates.Spec.PVC` populated 2023-07-05 12:08:12 UTC
Red Hat Issue Tracker CNV-30687 0 None None None 2023-07-05 12:10:00 UTC
Red Hat Product Errata RHSA-2023:6817 0 None None None 2023-11-08 14:06:02 UTC

Description Roni Kishner 2023-07-05 12:08:12 UTC
Description of problem:
When starting a VM with preference with the PreferredStorageClassName field, we must specify dataVolumeTemplates[0].spec.pvc, this will also auto populate dataVolumeTemplates[0].spec.pvc.resource which conflict with dataVolumeTemplates[0].spec.storage.resources.requests.storage

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

How reproducible:
100%

Steps to Reproduce:
1. Create VM with preference with PreferredStorageClassName
2. Add dataVolumeTemplates[0].spec.pvc.name to the VM spec
3. 

Actual results:
The VMI fail to be created with conflict error of 2 resources fields defined

Expected results:
The VMI should be created

Additional info:
an example of the conflict fields: 
    dataVolumeTemplates:
    - apiVersion: cdi.kubevirt.io/v1beta1
      kind: DataVolume
      metadata:
        creationTimestamp: null
        name: fedora
      spec:
        pvc:
          resources: {}
          storageClassName: nfs
          volumeName: volume-for-test
        sourceRef:
          kind: DataSource
          name: fedora
          namespace: openshift-virtualization-os-images
        storage:
          resources:
            requests:
              storage: "34087042032"

Comment 1 Roni Kishner 2023-08-06 08:41:10 UTC
Verified
https://github.com/kubevirt/kubevirt/pull/10154 also fixes related issues

Comment 3 errata-xmlrpc 2023-11-08 14:05:53 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.0 Images 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:6817


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