Description of problem: When using virtctl image-upload dv with --no-create to upload into an existing empty PVC, we get a timeout (used to work with both image-upload dv & pvc) Version-Release number of selected component (if applicable): CNV 2.6.0 How reproducible: 100% Steps to Reproduce: 1. Create an empty PVC 2. virtctl image-upload dv empty-pvc --image-path=./cirros-qcow2.img --insecure --no-create Actual results: virtctl times out Expected results: Upload successful Additional info: The same operation with virtctl that corresponds to CNV 2.5 succeeds (described in comment #1) This might be a happy accident but the fact that it is not intentional kind of rings the alarm bell [cnv-qe-jenkins@stg01-alex-rjlb7-executor virtctl-exist-pvc]$ cat empty_pvc.yaml --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: empty-pvc spec: volumeMode: Filesystem accessModes: - ReadWriteOnce resources: requests: storage: 3Gi storageClassName: nfs
Alex, in the old virtctl, when you upload to a DV when you have an existing PVC - did a DV get created?
(In reply to Natalie Gavrielov from comment #2) > Alex, in the old virtctl, when you upload to a DV when you have an existing > PVC - did a DV get created? A DV doesn't get created in the old/current virtctl for this operation: Downgraded: kubevirt-virtctl-2.5.4-107.el7_9.x86_64 Complete! [cnv-qe-jenkins@stg01-alex-rjlb7-executor virtctl-exist-pvc]$ oc create -f empty_pvc.yaml persistentvolumeclaim/empty-pvc created (reverse-i-search)`virt': ^Crtctl image-upload dv empty-pvc --image-path=./cirros-qcow2.img --insecure --no-create (reverse-i-search)`--in': virtctl image-upload dv empty-pvc --image-path=./cirros-qcow2.img ^Cinsecure --no-create [cnv-qe-jenkins@stg01-alex-rjlb7-executor virtctl-exist-pvc]$ virtctl image-upload dv empty-pvc --image-path=./cirros-qcow2.img --insecure --no-create Using existing PVC openshift-virtualization-os-images/empty-pvc Waiting for PVC empty-pvc upload pod to be ready... Pod now ready Uploading data to https://cdi-uploadproxy-openshift-cnv.apps.stg01-alex.cnv-qe.rhcloud.com 12.13 MiB / 12.13 MiB [==========================================================================================================================================================================================================] 100.00% 0s Uploading data completed successfully, waiting for processing to complete, you can hit ctrl-c without interrupting the progress Processing completed successfully Uploading ./cirros-qcow2.img completed successfully [cnv-qe-jenkins@stg01-alex-rjlb7-executor virtctl-exist-pvc]$ oc get dv -A No resources found
The combination of options used in this scenario is invalid: "virtctl image-upload dv empty-pvc --image-path=./cirros-qcow2.img --insecure --no-create" "dv" means use a DataVolume. --no-create means don't create the DataVolume because it already exists But you have created a PVC with the same name. So virtctl is looking for a DV which you said already exists and this eventually times out. I think we can improve virtctl with better messages in the following scenarios: 1. "virtctl dv my-disk ... --no-create" where my-disk does not exist: - Continue waiting but print a message "DV my-disk not found..." each time it is checked 2. "virtctl pvc my-disk ... --no-create" where my-disk does not exist: - Continue waiting but print a message "PVC my-disk not found..." each time it is checked 3. "virtctl dv my-disk ... --no-create" where my-disk is a PVC but a DV of the same name does not exist: - Print a message "Error: No DataVolume is associated with the existing PVC my-disk" and exit immediately.
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.8.0 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/RHSA-2021:2920