RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1315245 - qemu-img unable to parse the prefix "file:" correctlly.
Summary: qemu-img unable to parse the prefix "file:" correctlly.
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Hanna Czenczek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-07 11:06 UTC by Ping Li
Modified: 2016-03-24 05:20 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-08 19:05:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ping Li 2016-03-07 11:06:29 UTC
Description of problem:
qemu-img unable to parse the prefix "file:" correctlly. Create an image using the prexif "file:", whose filename actually contains that prefix.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-108.el7
3.10.0-355.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.create an image with prefix 'file:'.
# qemu-img create -f qcow2 file:ip-192.168.254.185:asdf 5G


Actual results:
# qemu-img create -f qcow2 file:ip-192.168.254.185:asdf 5G
Formatting 'file:ip-192.168.254.185:asdf', fmt=qcow2 size=5368709120 encryption=off cluster_size=65536 lazy_refcounts=off 
# ls -l
-rw-r--r-- 1 root root 197120 March   7 18:41 file:ip-192.168.254.185:asdf

Expected results:
Create an image whose name is "ip-192.168.254.185:asdf"

Additional info:
When test the issue on RHEL7.2, the case passed. 
RHEL7.2:
version of componests:
qemu-kvm-rhev-2.3.0-31.el7_2.8
3.10.0-327.13.1.el7.x86_64

# qemu-img create -f qcow2 file:ip-192.168.254.185:asdf 5G
Formatting 'file:ip-192.168.254.185:asdf', fmt=qcow2 size=5368709120 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
# ls -l
-rw-r--r-- 1 root root 197120 March   7 18:40 ip-192.168.254.185:asdf
# qemu-img info file:ip-192.168.254.185:asdf 
image: ip-192.168.254.185:asdf
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

RHEL7.3:
version of componests:
qemu-kvm-1.5.3-108.el7
3.10.0-355.el7.x86_64

# qemu-img create -f qcow2 file:ip-192.168.254.185:asdf 5G
Formatting 'file:ip-192.168.254.185:asdf', fmt=qcow2 size=5368709120 encryption=off cluster_size=65536 lazy_refcounts=off 
# ls -l
-rw-r--r-- 1 root root 197120 March   7 18:41 file:ip-192.168.254.185:asdf
# qemu-img info file:ip-192.168.254.185:asdf 
image: file:ip-192.168.254.185:asdf
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

#qemu-img create -f qcow2 ip-192.168.254.185:asdf 5G
qemu-img: ip-192.168.254.185:asdf: Unknown protocol 'ip-192.168.254.185:asdf'

Reference bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1072130

Comment 2 Ademar Reis 2016-03-08 19:05:40 UTC
From https://bugzilla.redhat.com/show_bug.cgi?id=1072130#c4:

"""
As your tests show, too, using the "file:" prefix creates an image whose filename actually contains that prefix, which is not correct. As I have said, I have sent upstream patches to fix this behavior which are however pretty difficult to backport. Therefore, my question (basically to everyone reading this bugzilla, therefore I'll leave needinfo cleared) remains:

Do we really need to fix the behavior in RHEL 6 for specifying the "file:" prefix ("file:foo:bar" should create a file named "foo:bar" instead of "file:foo:bar") or will the already working "./foo:bar" notation (which is probably more intuitive, anyway) suffice?
"""

Given the backport is not trivial, I'm closing this one in RHEL6 too. Please reopen if it's affecting customers or a layered product.


Note You need to log in before you can comment on or make changes to this bug.