containerized-data-importer icon indicating copy to clipboard operation
containerized-data-importer copied to clipboard

CDI errors out when the source PVC isn't found after a complete clone of Datavolume

Open RealHarshThakur opened this issue 2 years ago • 6 comments

What happened: After cloning a Datavolume from a PVC, CDI deployment logs show a lot of error messages about not finding the PVC.

What you expected to happen: CDI should ignore if PVC isn't found after a complete clone. It should ideally not check if the DV is in a good state.

How to reproduce it (as minimally and precisely as possible):

  1. Create a DataVolume backed by a PVC
  2. Delete the source PVC
  3. Check logs of cdi-deployment

Additional context: Add any other context about the problem here.

Environment:

  • CDI version (use kubectl get deployments cdi-deployment -o yaml): 1.47.0
  • Kubernetes version (use kubectl version): 1.21.0
  • DV specification: N/A
  • Cloud provider or hardware configuration: N/A
  • OS (e.g. from /etc/os-release): N/A
  • Kernel (e.g. uname -a): N/A
  • Install tools: N/A
  • Others: N/A

RealHarshThakur avatar May 26 '22 11:05 RealHarshThakur

So you are deleting the source PVC while the clone is ongoing? I am not entirely sure what you are doing.

awels avatar May 26 '22 12:05 awels

Hey @awels, the source PVC is deleted after the clone is complete but CDI-deployment complains about not finding the source PVC.

RealHarshThakur avatar May 26 '22 12:05 RealHarshThakur

Hmm yeah once the clone is complete we should not care about the source anymore. Let me investigate.

awels avatar May 26 '22 13:05 awels

Okay I just tried this this (admittedly with main) and after I cloned the source PVC, and deleted it, it is not reporting anything in the logs. Basically I did the following:

  1. Create a source DV with this yaml
apiVersion: cdi.kubevirt.io/v1alpha1
kind: DataVolume
metadata:
  namespace: "default"
  name: cirros-dv
spec:
  source:
    http:
      url: "https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img"
  pvc:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 1Gi
    storageClassName: rook-ceph-block
    volumeMode: Block
  1. Wait for it complete.
  2. Create a clone with this yaml
apiVersion: cdi.kubevirt.io/v1alpha1
kind: DataVolume
metadata:
  namespace: "default"
  name: cirros-fs-clone
spec:
  source:
    pvc:
      namespace: default
      name: cirros-dv
  storage:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 1Gi
    volumeMode: Filesystem
  1. Wait for that to complete.
  2. Delete the DV I created in step 1. and the logs shows it reconciling the deletion of the source and then nothing more.

What did I not do that reproduces your issue? Note I used rook-ceph storage class to create both block and filesystem PVCs

awels avatar May 27 '22 16:05 awels

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kubevirt-bot avatar Aug 25 '22 16:08 kubevirt-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

kubevirt-bot avatar Sep 24 '22 17:09 kubevirt-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

kubevirt-bot avatar Oct 24 '22 17:10 kubevirt-bot

@kubevirt-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

kubevirt-bot avatar Oct 24 '22 17:10 kubevirt-bot