Bug 2038679 - Clone with volume mode file system using Storage API fails
Summary: Clone with volume mode file system using Storage API fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Bartosz Rybacki
QA Contact: dalia
URL:
Whiteboard:
Depends On:
Blocks: 2050210
TreeView+ depends on / blocked
 
Reported: 2022-01-09 13:39 UTC by dalia
Modified: 2022-03-16 16:06 UTC (History)
6 users (show)

Fixed In Version: CNV v4.10.0-652
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2050210 (view as bug list)
Environment:
Last Closed: 2022-03-16 16:06:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 2096 0 None Merged BugId: 2038679 - Clone with volume mode file system using Storage API fails 2022-02-03 14:30:27 UTC
Github kubevirt containerized-data-importer pull 2133 0 None closed [release-v1.43] BugId: 2038679 - Clone with volume mode file system using Storage API fails 2022-02-06 09:54:21 UTC
Github kubevirt containerized-data-importer pull 2134 0 None Merged [release-v1.43] BugId: 2038679 - Clone with volume mode file system using Storage API fails 2022-02-06 09:54:46 UTC
Red Hat Product Errata RHSA-2022:0947 0 None Closed RHEL EUS Errata Documentation 2022-06-16 06:26:55 UTC

Description dalia 2022-01-09 13:39:55 UTC
Description of problem:
When cloning with volume mode file system, using storage API fails due to resizing.

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

How reproducible:
100%

Steps to Reproduce:
1. Create DV with file system, using storage api:

apiVersion: cdi.kubevirt.io/v1alpha1
kind: DataVolume
metadata: 
  name: <dv name>
  annotations:
    cdi.kubevirt.io/storage.bind.immediate.requested: "true"
spec: 
  storage: 
    resources: 
      requests: 
        storage: 38Gi
    storageClassName: hostpath-provisioner
  source: 
    http: 
      url: <os image>

2. Create clone

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: dest-dv
spec:
  source:
    pvc:
      name: <DV NAME>
      namespace: <DV NAMESPACE>
  storage:
    resources:
      requests:
        storage: 38Gi
    storageClassName: hostpath-provisioner
  contentType: kubevirt


Actual results:
clone fails: 
The request is invalid: spec.source.PVC: target resources requests storage size is smaller than the source


Expected results:
DV created.

Additional info:
Same clone using PVC API pass

Comment 1 Adam Litke 2022-01-10 12:36:35 UTC
Bartosz, please take a look.

Comment 2 Bartosz Rybacki 2022-01-11 13:31:16 UTC
Confirmed a problem exists, can easily recreate.

Validation webhook compares real PVC size of source volume with the requested size on spec.storage. 

Need to think how to correctly solve it, so it works for all cases (for example, when source filesystem has different overhead than target filesystem).

Comment 3 Adam Litke 2022-01-31 13:15:55 UTC
Peter, this is affecting the automatic boot source update feature.  Can you please approve blocker for it?

Comment 4 dalia 2022-02-09 15:03:50 UTC
verified on: CNV 4.10

Comment 9 errata-xmlrpc 2022-03-16 16:06:09 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 (Moderate: OpenShift Virtualization 4.10.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-2022:0947


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