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 1594622 - The error info is misleading when creating snapshot with the specified format is not qcow2
Summary: The error info is misleading when creating snapshot with the specified format...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-25 03:04 UTC by Tingting Mao
Modified: 2018-12-13 20:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-13 20:38:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tingting Mao 2018-06-25 03:04:03 UTC
Description of problem:
The error info is misleading when creating snapshot but not specifying the format.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.12.0-3.el7
kernel-3.10.0-906.el7

How reproducible:
100%

Steps to Reproduce:
1.Create base image 
# qemu-img create -f raw base.img 10G
Formatting 'base.imge', fmt=raw size=10737418240
2.Create snapshot not specifying the format
# qemu-img create -b base.img sn
qemu-img: sn: Backing file not supported for file format 'raw'


Actual results:


Expected results:
The error info should be like "Snapshot file not supported for file format 'raw'
", not the "backing file".


Additional info:
When specifying the backing file format with -F, the info is still the same
# qemu-img create -F raw -b base.imge sn
qemu-img: sn: Backing file not supported for file format 'raw'

Comment 2 Tingting Mao 2018-06-25 06:25:20 UTC
Re-tested steps:
1. Create base image
# qemu-img create -f raw base.img 10G
Formatting 'base.img', fmt=raw size=10737418240
2. Create snapshot specifying format not qcow2
# qemu-img create -b base.img -f raw sn
qemu-img: sn: Backing file not supported for file format 'raw'
# qemu-img create -b base.img -f luks sn
qemu-img: sn: Backing file not supported for file format 'luks'

According the test result, change the title to the new one.

Thanks for pingl's correction.

Comment 4 Ademar Reis 2018-06-25 20:23:57 UTC
Low priority low hanging fruit, probably worth fixing upstream and inheriting in a rebase.

Comment 7 Kevin Wolf 2018-11-20 13:31:25 UTC
The thing that is not supported is attaching a backing file to a raw image. I don't see what's wrong with the error message.

The suggested alternative "Snapshot not supported" I would understand as: "You cannot take a snapshot of a raw image". This is wrong, because you can snapshot a raw image when you attach it as a backing file to a qcow2 image.

So I think the current error message is actually better.

Comment 8 Tingting Mao 2018-11-21 02:20:26 UTC
(In reply to Kevin Wolf from comment #7)
> The thing that is not supported is attaching a backing file to a raw image.
> I don't see what's wrong with the error message.

Hi Kevin,

Thanks for your info at first. 

However, what confuses me is that in our daily work, we call the base image (i.e.'base.img' in this case) as 'backing file' while for new image created based on the 'base.img' is 'snapshot|overlay'.

So the error info seems like that 'base.img' is not supported for file format 'raw|luks'.

Please correct me if there is something wrong, and thanks in advance.

Comment 9 Kevin Wolf 2018-11-21 08:15:57 UTC
But the error message doesn't say that something is not supported for the backing file, but it says that having a backing file is not supported for the overlay image format.

The case that you seem to understand would be phrased like "$FORMAT is not supported for backing files" or "Cannot use $FORMAT for backing files". Note that this is "$FOO not supported for backing files", not "backing files not supported for $FOO".

Comment 10 Ping Li 2018-11-21 08:34:35 UTC
> # qemu-img create -b base.img sn
> qemu-img: sn: Backing file not supported for file format 'raw'

Hi Kevin,
If we don't specify the image format for sn, the default image format is raw. Although the command failed as expected, but it is not easy to know the reason from the error message. QEMU should bring up an intuitionisticly hint such as "snapshot is not supported for the file format 'raw'" or "snapshot is only supported for the file format qcow2"

Comment 11 Ademar Reis 2018-12-13 20:38:48 UTC
(In reply to Kevin Wolf from comment #9)
> But the error message doesn't say that something is not supported for the
> backing file, but it says that having a backing file is not supported for
> the overlay image format.
> 
> The case that you seem to understand would be phrased like "$FORMAT is not
> supported for backing files" or "Cannot use $FORMAT for backing files". Note
> that this is "$FOO not supported for backing files", not "backing files not
> supported for $FOO".

Kevin asked for my opinion in reviewing this case and error message. After carefully considering the alternatives, I agree with him that the current error message is correct and the alternative would be technically misleading and could confuse some people as well.

So given this is a low priority issue, it's not worth spending too much time on it and I'm closing this BZ. I hope you understand. Thanks.


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