Bug 1668244
| Summary: | qemu-img: /var/tmp/v2vovl9951f8.qcow2: CURL: Error opening file: The requested URL returned error: 404 Not Found | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Xiaodai Wang <xiaodwan> | ||||
| Component: | qemu-kvm | Assignee: | Markus Armbruster <armbru> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Tingting Mao <timao> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 8.0 | CC: | armbru, berrange, bthurber, cfergeau, coli, eblake, juzhou, mxie, mzhan, ptoscano, rbalakri, ribarry, rjones, tzheng, virt-maint, zili | ||||
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
||||
| Target Release: | 8.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | qemu-kvm-3.1.0-11.module+el8+2747+40c9b77e | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-05-29 16:05:29 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 910269 | ||||||
| Attachments: |
|
||||||
I can reproduce this from a Fedora 30 client too. This may be a qemu-kvm problem. I can reproduce it with below package. qemu-kvm-3.1.0-5.module+el8+2708+fbd828c6.x86_64 After downgrade it to below versions, i cannot reproduce it. qemu-kvm-2.12.0-57.module+el8+2683+02b3b955.x86_64 This is a bug in qemu. Here's a simple reproducer:
Case 1:
qemu-img info 'json:{ "file.sslverify": "off", "file.driver": "https", "file.url": "https://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/development/rawhide/Server/x86_64/iso/Fedora-Server-dvd-x86_64-Rawhide-20190121.n.1.iso" }'
=> successful
Case 2:
qemu-img info 'json:{ "file.sslverify": "off", "file.driver": "https", "file.url": "https://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/development/rawhide/Server/x86_64/iso/Fedora-Server-dvd-x86%5f64-Rawhide-20190121.n.1.iso" }'
=> 404 error
The only difference in the two cases is that I replaced an '_' character in the URL with '%5f'.
By the normal rules of URI percent escaping this should make no difference.
By enabling debugging in the curl driver in qemu you can see that it is replacing
%5f with 5f when passing the URL to curl, so it's not a bug in curl, but in qemu.
git bisect says:
8bca4613e6cddd948895b8db3def05950463495b is the first bad commit
commit 8bca4613e6cddd948895b8db3def05950463495b
Author: Markus Armbruster <armbru>
Date: Thu Aug 23 18:40:24 2018 +0200
json: Support %% in JSON strings when interpolating
The previous commit makes JSON strings containing '%' awkward to
express in templates: you'd have to mask the '%' with an Unicode
escape \u0025. No template currently contains such JSON strings.
Support the printf conversion specification %% in JSON strings as a
convenience anyway, because it's trivially easy to do.
Signed-off-by: Markus Armbruster <armbru>
Reviewed-by: Eric Blake <eblake>
Message-Id: <20180823164025.12553-58-armbru>
:040000 040000 3ecaa2dbe471bdeda89dee5c1c49fe9887a6fdd8 b9bf4175a3f7268b2d92987d16a4a6576b1a56af M qobject
:040000 040000 4aa22dfd501cf888a1024c1016382fc48ec8653e bcea08fdbfd30820207e118f1b2769dfa9300523 M tests
Patch proposed upstream at https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00108.html (In reply to Daniel Berrange from comment #6) > Patch proposed upstream at > https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00108.html Thanks - can confirm this patch fixes the problem for me. Fixed in upstream commit bbc0586ced6e9ffdfd29d89fcc917b3d90ac3938. Fix included in qemu-kvm-3.1.0-11.module+el8+2747+40c9b77e Verified this bug as below:
Tested packages:
qemu-kvm-3.1.0-15.module+el8+2792+e33e01a0
Steps:
# qemu-img info 'json:{"file.driver":"https", "file.url":"https://10.73.194.81/RHEL7.6-Server-x86_64.iso", "file.sslverify":"off", "file.readahead":"64k"}'
image: json:{"driver": "raw", "file": {"url": "https://10.73.194.81/RHEL7.6-Server-x86_64.iso", "readahead": "64k", "driver": "https", "sslverify": "off"}}
file format: raw
virtual size: 512 (512 bytes)
disk size: unavailable
# qemu-img info 'json:{"file.driver":"https", "file.url":"https://10.73.194.81/RHEL7.6-Server-x86%5f64.iso", "file.sslverify":"off", "file.readahead":"64k"}'
image: json:{"driver": "raw", "file": {"url": "https://10.73.194.81/RHEL7.6-Server-x86%5f64.iso", "readahead": "64k", "driver": "https", "sslverify": "off"}}
file format: raw
virtual size: 512 (512 bytes)
disk size: unavailable
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/RHBA-2019:1293 |
Created attachment 1522354 [details] virt-v2v debug log Description of problem: qemu-img: /var/tmp/v2vovl9951f8.qcow2: CURL: Error opening file: The requested URL returned error: 404 Not Found Version-Release number of selected component (if applicable): virt-v2v-1.40.1-1.module+el8+2708+fbd828c6.x86_64 libguestfs-1.40.1-1.module+el8+2708+fbd828c6.x86_64 How reproducible: 100% Steps to Reproduce: 1. convert a guest in esx server. # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -os images -of raw esx6.7-rhel7.6-x86_64 --password-file /tmp/v2v_vpx_passwd -v -x Actual results: qemu-img: /var/tmp/v2vovl9951f8.qcow2: CURL: Error opening file: The requested URL returned error: 404 Not Found Expected results: The guest should be converted successfully. Additional info: