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 2086980 - Please Update The Error Info More Clearly When Creating Images Over RBD with The Namespace Not Existing
Summary: Please Update The Error Info More Clearly When Creating Images Over RBD with ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Stefano Garzarella
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On: 2111769
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-17 02:45 UTC by Tingting Mao
Modified: 2023-05-09 07:42 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-7.1.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:19:33 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-122297 0 None None None 2022-05-17 02:52:53 UTC
Red Hat Product Errata RHSA-2023:2162 0 None None None 2023-05-09 07:20:28 UTC

Description Tingting Mao 2022-05-17 02:45:12 UTC
Description of problem:
As the subject, and the bug is from the discussion of https://bugzilla.redhat.com/show_bug.cgi?id=1873925#c10 .


Version-Release number of selected component (if applicable):
qemu-kvm-7.0.0-3.el9
librbd1-16.2.4-5.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
# qemu-img create 'rbd:rbd/aa/new3:conf=/etc/ceph/ceph.conf:id=admin:key=AQBwUmlfB9VwKhAA0HwqNhKCfarcItKtCR9ulg==' 1M
Formatting 'rbd:rbd/aa/new3:conf=/etc/ceph/ceph.conf:id=admin:key=AQBwUmlfB9VwKhAA0HwqNhKCfarcItKtCR9ulg==', fmt=raw size=1048576
qemu-img: rbd:rbd/aa/new3:conf=/etc/ceph/ceph.conf:id=admin:key=AQBwUmlfB9VwKhAA0HwqNhKCfarcItKtCR9ulg==: error rbd create: No such file or directory

# qemu-img create rbd:rbd/aa/testtt.img 1G
Formatting 'rbd:rbd/aa/testtt.img', fmt=raw size=1073741824
qemu-img: rbd:rbd/aa/testtt.img: error rbd create: No such file or directory


Actual results:
As above, created failed with ' No such file or directory'.


Expected results:
A more clear error hint info like "No a namespace named 'aa'"N=.


Additional info:

Comment 3 Stefano Garzarella 2022-05-17 07:06:32 UTC
v1 posted: https://lore.kernel.org/qemu-devel/20220516100324.61122-1-sgarzare@redhat.com/T/#u

The new output will be:
  $ qemu-img create rbd:rbd/namespace/image 1M
  Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
  qemu-img: rbd:rbd/namespace/image: namespace 'namespace' does not exist

Comment 4 Stefano Garzarella 2022-05-17 07:14:45 UTC
v2 posted upstream with a minor fix: https://lore.kernel.org/qemu-devel/20220517071012.6120-1-sgarzare@redhat.com/T/#u

Comment 6 Stefano Garzarella 2022-06-27 08:58:07 UTC
Commit merged upstream: https://gitlab.com/qemu-project/qemu/-/commit/66dc5f9606bec7ce029e98a90f209153dfade82e

commit 66dc5f9606bec7ce029e98a90f209153dfade82e
Author: Stefano Garzarella <sgarzare>
Date:   Tue May 17 09:10:12 2022 +0200

    block/rbd: report a better error when namespace does not exist
    
    If the namespace does not exist, rbd_create() fails with -ENOENT and
    QEMU reports a generic "error rbd create: No such file or directory":
    
        $ qemu-img create rbd:rbd/namespace/image 1M
        Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
        qemu-img: rbd:rbd/namespace/image: error rbd create: No such file or directory
    
    Unfortunately rados_ioctx_set_namespace() does not fail if the namespace
    does not exist, so let's use rbd_namespace_exists() in qemu_rbd_connect()
    to check if the namespace exists, reporting a more understandable error:
    
        $ qemu-img create rbd:rbd/namespace/image 1M
        Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
        qemu-img: rbd:rbd/namespace/image: namespace 'namespace' does not exist
    
    Reported-by: Tingting Mao <timao>
    Reviewed-by: Ilya Dryomov <idryomov>
    Signed-off-by: Stefano Garzarella <sgarzare>
    Message-Id: <20220517071012.6120-1-sgarzare>
    Signed-off-by: Kevin Wolf <kwolf>

Comment 9 Yanan Fu 2022-09-07 08:31:22 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 10 Tingting Mao 2022-09-08 03:24:55 UTC
Tried with the latest qemu, the hint info is as expected. Thanks.


Tested with:
qemu-kvm-7.1.0-1.el9
kernel-5.14.0-160.el9.x86_64


Steps:
# qemu-img create 'rbd:rbd/aa/new3:conf=/etc/ceph/ceph.conf:id=admin:key=AQBwUmlfB9VwKhAA0HwqNhKCfarcItKtCR9ulg==' 1M
Formatting 'rbd:rbd/aa/new3:conf=/etc/ceph/ceph.conf:id=admin:key=AQBwUmlfB9VwKhAA0HwqNhKCfarcItKtCR9ulg==', fmt=raw size=1048576
qemu-img: rbd:rbd/aa/new3:conf=/etc/ceph/ceph.conf:id=admin:key=AQBwUmlfB9VwKhAA0HwqNhKCfarcItKtCR9ulg==: namespace 'aa' does not exist

# qemu-img info rbd:rbd/aa/testtt.img
qemu-img: Could not open 'rbd:rbd/aa/testtt.img': namespace 'aa' does not exist

Comment 13 Tingting Mao 2022-09-14 07:40:40 UTC
Set this bug as verified according to Comment10.

Comment 15 errata-xmlrpc 2023-05-09 07:19:33 UTC
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 (Moderate: qemu-kvm security, bug fix, and enhancement update), 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/RHSA-2023:2162


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