Bug 2102180 - [4.10.z]Smart clone and csi clone leaves tmp unbound PVC and ObjectTransfer
Summary: [4.10.z]Smart clone and csi clone leaves tmp unbound PVC and ObjectTransfer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.10.6
Assignee: Michael Henriksen
QA Contact: Yan Du
URL:
Whiteboard:
: 2128243 (view as bug list)
Depends On: 2101954
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-29 12:33 UTC by Yan Du
Modified: 2022-10-25 14:47 UTC (History)
8 users (show)

Fixed In Version: v4.10.6-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2101954
Environment:
Last Closed: 2022-10-25 14:47:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 2415 0 None Merged [release-v1.43] fix issue #2323: Cross namespace smart clone not cleaning up 2022-09-28 13:06:15 UTC
Red Hat Knowledge Base (Solution) 6976484 0 None None None 2022-09-21 12:13:08 UTC
Red Hat Product Errata RHEA-2022:7179 0 None None None 2022-10-25 14:47:11 UTC

Description Yan Du 2022-06-29 12:33:48 UTC
+++ This bug was initially created as a clone of Bug #2101954 +++

Description of problem:

Smart-clone and CSI clone across namespace leaves orphan unbound PVC in source namespace.  Also, the corresponding ObjectTransfer resource is not deleted until the target DataVolume is deleted.

This issue was originally submitted in github here:  https://github.com/kubevirt/containerized-data-importer/issues/2323


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


How reproducible:

100%


Steps to Reproduce:
1.  Create DataVolume in namespace A populated by http import
2.  Clone above DataVolume to Namespace B

Actual results:

There is a tmp unbound PVC in namespace A
There is completed ObjectTransfer

Expected results:

No unexpected resources


Additional info:

https://github.com/kubevirt/containerized-data-importer/issues/2323

Comment 1 Michael Henriksen 2022-06-29 13:12:52 UTC
This is not an issue in 4.10

Comment 2 Yan Du 2022-06-29 13:48:37 UTC
Close the bug according #Comment 1

Comment 3 Yan Du 2022-08-11 10:04:27 UTC
Hi, Michael
we can reproduce the bug on CNV-v4.10.3 and CNV-v4.10.4-12

$ oc get pvc
NAME                                           STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
cdi-tmp-1535a93c-e982-4b18-93ef-181a59e5372a   Pending                                                                        ocs-storagecluster-ceph-rbd   14s
golden-centos-dv                               Bound     pvc-fd2b1f41-d1c1-4e27-bab1-06091c10b416   10Gi       RWO            ocs-storagecluster-ceph-rbd   3m54s

I think we may need to backport to 4.10.z

Comment 4 Yan Du 2022-08-11 14:17:15 UTC
Also tried on CNV-v4.9.6-27, issue can not be reproduced.

Comment 5 Michael Henriksen 2022-08-11 17:26:24 UTC
Interesting!  Is the ObjectTransfer left around as well?

Comment 6 Jenia Peimer 2022-08-11 18:08:10 UTC
Yes:

$ oc get ObjectTransfer
NAME                                           AGE   PHASE
cdi-tmp-b4c6699c-b517-4529-9785-11f04db7ab77   8h    Complete

Comment 7 Michael Henriksen 2022-08-12 13:08:26 UTC
I see now, the issue was not originally in 4.10 but the bug was backported to it

Comment 8 Yan Du 2022-09-21 12:13:09 UTC
*** Bug 2128243 has been marked as a duplicate of this bug. ***

Comment 9 Yan Du 2022-09-28 12:13:08 UTC
Michael, do you plan to fix it in 4.10.6?

Comment 10 Michael Henriksen 2022-09-28 13:06:16 UTC
Fix was merged:  https://github.com/kubevirt/containerized-data-importer/pull/2415

Comment 11 Fuhui Yang 2022-09-30 02:19:56 UTC
Version-Release number of selected component (if applicable):
CNV-v4.10.6-9

Steps to Reproduce:
1.  Create a datavolume with a source url in A namespace, and the yaml file is below:
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: golden-centos-dv
  namespace: fuhui
spec:
  source:
    http:
      url: "http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2"
  pvc:
    storageClassName: ocs-storagecluster-ceph-rbd
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 10Gi

2. Verify the status of dv & pvc:
[cnv-qe-jenkins@n-yoss-410-flwdp-executor ~]$ oc get dv
NAME               PHASE       PROGRESS   RESTARTS   AGE
golden-centos-dv   Succeeded   100.0%                4m7s
[cnv-qe-jenkins@n-yoss-410-flwdp-executor ~]$ oc get pvc
NAME               STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
golden-centos-dv   Bound    pvc-d86232a8-c0fa-435c-80ba-d73f0d518b27   10Gi       RWO            ocs-storagecluster-ceph-rbd   4m10s

3. Clone this dv into B namespace, the yaml file is below:
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: clone-centos-dv-customer1
  namespace: test
spec:
  source:
    pvc:
      namespace: fuhui
      name: golden-centos-dv
  pvc:
    storageClassName: ocs-storagecluster-ceph-rbd
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 10Gi

4. Verify the DV & PVC & ObjectTransfer in A and B namespace:
[cnv-qe-jenkins@n-yoss-410-flwdp-executor ~]$ oc get dv
NAME                        PHASE       PROGRESS   RESTARTS   AGE
clone-centos-dv-customer1   Succeeded   N/A                   17s
[cnv-qe-jenkins@n-yoss-410-flwdp-executor ~]$ oc get pvc
NAME                        STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
clone-centos-dv-customer1   Bound    pvc-e0d3d009-b8dc-4fc6-9801-6f48d2234e9a   10Gi       RWO            ocs-storagecluster-ceph-rbd   12s
[cnv-qe-jenkins@n-yoss-410-flwdp-executor ~]$ oc get pvc -n fuhui
NAME               STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
golden-centos-dv   Bound    pvc-d86232a8-c0fa-435c-80ba-d73f0d518b27   10Gi       RWO            ocs-storagecluster-ceph-rbd   25m
[cnv-qe-jenkins@n-yoss-410-flwdp-executor ~]$ oc get objecttransfer
No resources found

Comment 17 errata-xmlrpc 2022-10-25 14:47:02 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.10.6 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-2022:7179


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