Bug 2086980
Summary: | Please Update The Error Info More Clearly When Creating Images Over RBD with The Namespace Not Existing | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Tingting Mao <timao> |
Component: | qemu-kvm | Assignee: | Stefano Garzarella <sgarzare> |
qemu-kvm sub component: | Ceph | QA Contact: | Tingting Mao <timao> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | low | CC: | chayang, coli, jinzhao, juzhang, mrezanin, sgarzare, virt-maint, yfu |
Version: | 9.1 | Keywords: | Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-7.1.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-05-09 07:19:33 UTC | Type: | Enhancement |
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: | 2111769 | ||
Bug Blocks: |
Description
Tingting Mao
2022-05-17 02:45:12 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 v2 posted upstream with a minor fix: https://lore.kernel.org/qemu-devel/20220517071012.6120-1-sgarzare@redhat.com/T/#u 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> QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass. 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 Set this bug as verified according to Comment10. 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 |