Bug 1913320

Summary: Informative message needed with virtctl image-upload, that additional step is needed from the user
Product: Container Native Virtualization (CNV) Reporter: Kevin Alon Goldblatt <kgoldbla>
Component: StorageAssignee: Bartosz Rybacki <brybacki>
Status: CLOSED ERRATA QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.6.0CC: alitke, brybacki, cnv-qe-bugs, pelauter
Target Milestone: ---   
Target Release: 2.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubevirt-v0.36.1-158 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-10 11:22:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Alon Goldblatt 2021-01-06 14:03:30 UTC
Description of problem:
Currently when using virtctl image-upload with new logic enabled it just waits until reaching timeout and fails. The DV is in the WFFC phase.

Inform user about the situation, point that additional manual action is needed or immediately fail with warning. 

Version-Release number of selected component (if applicable):
oc version
Client Version: 4.7.0-202012220147.p0-8fbc95f
Server Version: 4.7.0-fc.0
Kubernetes Version: v1.20.0+87544c5


oc get csv --all-namespaces
NAMESPACE                              NAME                                           DISPLAY                       VERSION                 REPLACES                                  PHASE
openshift-cnv                          kubevirt-hyperconverged-operator.v2.6.0        OpenShift Virtualization      2.6.0                   kubevirt-hyperconverged-operator.v2.5.2   Succeeded
openshift-local-storage                local-storage-operator.4.6.0-202012161211.p0   Local Storage                 4.6.0-202012161211.p0                                             Succeeded
openshift-operator-lifecycle-manager   packageserver                                  Package Server                0.17.0                                                            Succeeded
openshift-storage                      ocs-operator.v4.6.1-206.ci                     OpenShift Container Storage   4.6.1-206.ci                                                      Succeeded


How reproducible:
100%

Steps to Reproduce:
1.virtctl image-upload dv test-dv --image-path --size --storage-class --insecure

Waiting for PVC test-dv upload pod to be ready...
timed out waiting for the condition
2.
3.

Actual results:
Waiting for PVC test-dv upload pod to be ready...
timed out waiting for the condition

Expected results:
Inform user about the situation, point that additional manual action is needed or immediately fail with warning. 

Additional info:

Comment 1 Adam Litke 2021-01-08 17:01:43 UTC
Any updates on this bug?  We are approaching the blockers only phase.

Comment 2 Bartosz Rybacki 2021-01-12 08:07:01 UTC
PR open:
https://github.com/kubevirt/kubevirt/pull/4779

Comment 3 Peter Lauterbach 2021-01-12 14:58:18 UTC
Since we can't support the CLI workflow, and it will hang forever, we need to error and exit.

Comment 4 Bartosz Rybacki 2021-01-20 09:56:25 UTC
included in the upstream release https://github.com/kubevirt/kubevirt/releases/tag/v0.36.1

Comment 5 Kevin Alon Goldblatt 2021-01-26 11:55:01 UTC
Verified with the following code:
---------------------------------------------
oc version
Client Version: 4.7.0-202101202207.p0-6f8f260
Server Version: 4.7.0-fc.3
Kubernetes Version: v1.20.0+d9c52cc

oc get csv --all-namespaces
NAMESPACE                              NAME                                           DISPLAY                       VERSION                 REPLACES                                       PHASE
openshift-cnv                          kubevirt-hyperconverged-operator.v2.6.0        OpenShift Virtualization      2.6.0                   kubevirt-hyperconverged-operator.v2.5.3        Succeeded
openshift-local-storage                local-storage-operator.4.6.0-202101160045.p0   Local Storage                 4.6.0-202101160045.p0   local-storage-operator.4.6.0-202101090040.p0   Succeeded
openshift-operator-lifecycle-manager   packageserver                                  Package Server                0.17.0                                                                 Succeeded
openshift-storage                      ocs-operator.v4.7.0-238.ci                     OpenShift Container Storage   4.7.0-238.ci                                                           Succeeded

virtctl version
Client Version: version.Info{GitVersion:"v0.36.1-6-ge9d66a5", GitCommit:"e9d66a55ddb0f7caafc5523c58ede7fec54cf8e7", GitTreeState:"clean", BuildDate:"2021-01-24T09:34:10Z", GoVersion:"go1.14.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{GitVersion:"v0.36.1-6-ge9d66a5", GitCommit:"e9d66a55ddb0f7caafc5523c58ede7fec54cf8e7", GitTreeState:"clean", BuildDate:"2021-01-24T09:36:43Z", GoVersion:"go1.14.12", Compiler:"gc", Platform:"linux/amd64"}



Verified with the following scenario:
---------------------------------------------
1. virtctl image-upload dv upload-hp1 --image-path=./cirros-0.4.0-x86_64-disk.img --size=100Mi --storage-class=hostpath-provisioner --uploadproxy-url=https://cdi-uploadproxy-route-cdi.cloudapps.example.com --insecure
DataVolume default/upload-hp1 created
Waiting for PVC upload-hp1 upload pod to be ready...
cannot upload to DataVolume in WaitForFirstConsumer state, make sure the PVC is Bound



Moving to VERIFIED!

Comment 8 errata-xmlrpc 2021-03-10 11:22:46 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 2.6.0 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:0799