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 2217204 - Protocol Driver 'iscsi' Does Not Support Image Creation
Summary: Protocol Driver 'iscsi' Does Not Support Image Creation
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Hanna Czenczek
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-25 02:21 UTC by Tingting Mao
Modified: 2023-09-14 05:33 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-13 12:26:48 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-160669 0 None None None 2023-06-25 02:22:16 UTC

Description Tingting Mao 2023-06-25 02:21:21 UTC
Description of problem:
Protocol driver 'iscsi' does not support image creation.


Version-Release number of selected component (if applicable):
qemu-kvm-6.2.0-35.module+el8.9.0+19166+e262ca96


How reproducible:
100%


Steps to Reproduce:
# qemu-img create -f raw iscsi:// 5G
Formatting 'iscsi://', fmt=raw size=5368709120
qemu-img: iscsi://: Protocol driver 'iscsi' does not support image creation, and opening the image failed: Failed to parse URL : iscsi://


Actual results:
As above


Expected results:
Image creationg should be supported.


Additional info:

Comment 1 Kevin Wolf 2023-06-26 11:04:39 UTC
iscsi:// alone is not a valid path, it requires a valid path to an iscsi device (like host_device requires a valid path to an existing host block device).

The error message might be a bit confusing, though. While the 'iscsi' driver doesn't implement image creation, it does support 'qemu-img create' from the user's perspective.

Anyway, Hanna, it's your code, so you get to decide whether you want to change anything or not.

Comment 2 Tingting Mao 2023-06-27 02:10:17 UTC
Thanks Kevin's explanation. I will set lower priority for the bug then.

And yes, the error message is a bit confusing, because as I tried with other protocal, like rbd, it will not prompt the protocal is not supported.

# qemu-img create -f raw rbd://xxx 1G
Formatting 'rbd://xxx', fmt=raw size=1073741824
qemu-img: rbd://xxx: error opening pool : No such file or directory

Comment 3 Kevin Wolf 2023-06-27 09:01:46 UTC
Note that a difference with rbd is that rbd can actually create new block devices, iscsi can only use existing devices.

But of course, the error message is still confusing.

Comment 4 Tingting Mao 2023-06-28 08:19:40 UTC
(In reply to Kevin Wolf from comment #3)
> Note that a difference with rbd is that rbd can actually create new block
> devices, iscsi can only use existing devices.
> 
> But of course, the error message is still confusing.

Ah, get it. Thanks for the clarification.

Comment 5 Hanna Czenczek 2023-07-03 12:15:12 UTC
I’m not sure how the error message can be improved.  As far as I understand, it is completely true that our iscsi driver does not support creating a new image, so it only allows using an existing image for “creation”.  The error message reflects this: New images cannot be created, and no existing image can be found under the given URL.

Should the error message simply not say that new images cannot be created?  I would find that confusing, too, when I try to create a new image (e.g. `qemu-img create nbd://localhost/new_image 64M`) and the error message only tells me that no such existing image can be opened, when clearly, I’m trying to create a new one.

Should it be more verbose?  E.g. "Protocol driver '$DRIVER' does not support creating new images, so an existing image must be selected as the target; however, opening the given target as an existing image failed: $REASON"?

Comment 6 Tingting Mao 2023-07-04 02:17:40 UTC
(In reply to Hanna Czenczek from comment #5)
> I’m not sure how the error message can be improved.  As far as I understand,
> it is completely true that our iscsi driver does not support creating a new
> image, so it only allows using an existing image for “creation”.  The error
> message reflects this: New images cannot be created, and no existing image
> can be found under the given URL.
> 
> Should the error message simply not say that new images cannot be created? 
> I would find that confusing, too, when I try to create a new image (e.g.
> `qemu-img create nbd://localhost/new_image 64M`) and the error message only
> tells me that no such existing image can be opened, when clearly, I’m trying
> to create a new one.
> 
> Should it be more verbose?  E.g. "Protocol driver '$DRIVER' does not support
> creating new images, so an existing image must be selected as the target;
> however, opening the given target as an existing image failed: $REASON"?

This would be clear enough for me. 

And "Protocol driver '$DRIVER' does not support new image creation, so an existing image must be specified as the target;
however, opening the given target failed: $REASON"?" would be also good for me.

Thanks.

Comment 7 Kevin Wolf 2023-07-04 14:07:44 UTC
(In reply to Hanna Czenczek from comment #5)
> Should it be more verbose?  E.g. "Protocol driver '$DRIVER' does not support
> creating new images, so an existing image must be selected as the target;
> however, opening the given target as an existing image failed: $REASON"?

Yes, I think this would be much clearer. The problem with the current message is that the command is 'qemu-img create', so "creating" is likely to be understood as "'qemu-img create' can't work for this protocol". With your change, it's clear that this is not what is meant.

Comment 8 Hanna Czenczek 2023-09-13 12:26:48 UTC
Closing this BZ: I’m not planning to (explicitly) fix this for 8.x.  To have a BZ for 9.4, we’d need to clone this one, which doesn’t make much sense now with the transition to Jira.

I’ve set the linked Jira issue’s “Fix Version/s” to 9.4.0, and I’ll continue to track progress there (https://issues.redhat.com/browse/RHELPLAN-160669).


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