Bug 2006418 - Clone Strategy does not work as described
Summary: Clone Strategy does not work as described
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.0
Assignee: Bartosz Rybacki
QA Contact: Yan Du
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-21 17:21 UTC by Bartosz Rybacki
Modified: 2023-09-15 01:15 UTC (History)
5 users (show)

Fixed In Version: v4.9.0-214
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-02 16:01: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 1951 0 None Merged Correct the cloneStrategy on StorageProfile 2021-09-23 15:27:12 UTC
Github kubevirt containerized-data-importer pull 1953 0 None Merged [release-v1.38] Correct the cloneStrategy on StorageProfile 2021-09-23 15:27:15 UTC
Red Hat Product Errata RHSA-2021:4104 0 None None None 2021-11-02 16:01:30 UTC

Description Bartosz Rybacki 2021-09-21 17:21:49 UTC
Description of problem:


Trying to set clone strategy on storage profile:


----
apiVersion: cdi.kubevirt.io/v1beta1
kind: StorageProfile
metadata:
  name: rook-ceph-block
spec:
  cloneStrategy: copy
status
  cloneStrategy: copy
  claimPropertySets:
  - accessModes:
    - ReadWriteMany
    volumeMode: Block


But the actual implementation accepts clone strategy on claimPropertySet level:

----
apiVersion: cdi.kubevirt.io/v1beta1
kind: StorageProfile
metadata:
  name: rook-ceph-block
spec:
  claimPropertySets:
    cloneStrategy: copy
status
  claimPropertySets:
  - accessModes:
    - ReadWriteMany
    volumeMode: Block
    cloneStrategy: copy

This is a incorrect. 


How reproducible:

Always

Steps to Reproduce:
1. k patch storageprofiles.cdi.kubevirt.io rook-ceph-block --type='json' -p='[{"op": "add" , "path": "/spec/cloneStrategy", "value": "copy"}]'


Actual results:

storageprofile.cdi.kubevirt.io/rook-ceph-block patched (no change)

Expected results:

storageprofile.cdi.kubevirt.io/rook-ceph-block patched


Additional info:
Upstream documentation does not show an example. It might be useful.

Comment 1 Yan Du 2021-09-22 12:25:02 UTC
Peter, Setting this as a blocker because we made a mistake for the API and we want to fix it before the API starts to be used.

Comment 2 Yan Du 2021-09-28 08:19:07 UTC
Test on CNV v4.9.0-220, issue has been fixed.

$ oc patch StorageProfile ocs-storagecluster-ceph-rbd --type='json' -p='[{"op": "add" , "path": "/spec/cloneStrategy", "value": "copy"}]'
storageprofile.cdi.kubevirt.io/ocs-storagecluster-ceph-rbd patched

$ oc get StorageProfile ocs-storagecluster-ceph-rbd -o yaml
-----------8<------------------
spec:
  cloneStrategy: copy
status:
  claimPropertySets:
  - accessModes:
    - ReadWriteMany
    volumeMode: Block
  cloneStrategy: copy
  provisioner: openshift-storage.rbd.csi.ceph.com
  storageClass: ocs-storagecluster-ceph-rbd

Comment 3 Yan Du 2021-09-28 08:19:07 UTC
Test on CNV v4.9.0-220, issue has been fixed.

$ oc patch StorageProfile ocs-storagecluster-ceph-rbd --type='json' -p='[{"op": "add" , "path": "/spec/cloneStrategy", "value": "copy"}]'
storageprofile.cdi.kubevirt.io/ocs-storagecluster-ceph-rbd patched

$ oc get StorageProfile ocs-storagecluster-ceph-rbd -o yaml
-----------8<------------------
spec:
  cloneStrategy: copy
status:
  claimPropertySets:
  - accessModes:
    - ReadWriteMany
    volumeMode: Block
  cloneStrategy: copy
  provisioner: openshift-storage.rbd.csi.ceph.com
  storageClass: ocs-storagecluster-ceph-rbd

Comment 6 errata-xmlrpc 2021-11-02 16:01: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.9.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-2021:4104

Comment 7 Red Hat Bugzilla 2023-09-15 01:15:22 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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