Hide Forgot
Description of problem: There are two different scenarios where virtctl image-upload would fail, and it shouldn't: #1 $ virtctl image-upload --uploadproxy-url=https://cdi-uploadproxy-kube-system.apps.10.19.138.91.nip.io/ --pvc-name=upload-fedora-pvc4 --pvc-size=5Gi --image-path=tmp/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 --insecure Unexpected return value 500 #2 $ virtctl image-upload --uploadproxy-url=https://cdi-uploadproxy-kube-system.apps.10.19.138.91.nip.io/v1alpha1/upload --pvc-name=upload-fedora-pvc2 --pvc-size=5Gi --image-path=tmp/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 --insecure Unexpected return value 404 First one fails because of the trailing slash while the second one fails cause the code unconditionally adds '/v1alpha1/upload' the URL specified on the CLI. Version-Release number of selected component (if applicable): Client Version: version.Info{GitVersion:"v0.9.6", GitCommit:"4badea07eb02458d4c64395f234fd2b77d74057e", GitTreeState:"clean", BuildDate:"2018-11-26T13:36:46Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{GitVersion:"v1.3.0-13-2-g377460b", GitCommit:"4badea07eb02458d4c64395f234fd2b77d74057e", GitTreeState:"clean", BuildDate:"2018-11-26T14:36:46Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"linux/amd64"} How reproducible: Always Steps to Reproduce: 1. Follow the steps above. Actual results: Error 500 or 404 Expected results: For the URL to be sanitized. Additional info:
Possible fix: https://github.com/kubevirt/kubevirt/pull/1864
PR 1864 was closed in favor of https://github.com/kubevirt/kubevirt/pull/1876
Anna, please take this bug. We should add a fix to virtctl to remove trailing slashes and then backport that to the stable release branch for 1.4.
The fix is in PR https://github.com/kubevirt/kubevirt/pull/1981 Currentky wiating for PR to be merged, then will proceed with backporting
Hi Anna, Any updates on when this will be merged?
Hi, I am implementing unit test for the fix, as requested in the PR. Hopefully will deliver that tomorrow
(In reply to Anna Stopel from comment #6) > Hi, I am implementing unit test for the fix, as requested in the PR. > Hopefully will deliver that tomorrow What is the status? As reminder, this is targeted for 1.4.
Adam can you file a documentation bug for 1.4.
Created doc bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1674505
fixed and merged in https://github.com/kubevirt/kubevirt/pull/1981
@Anna, if already in some build, can you please move it to on_qa and set the appropriate "Fixed In Version"? Thank you!
@Adam, can this be moved to on_qa?
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, 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-2019:1850