Description of problem: As subject Though qemu-kvm is not rebased to 5.0 now, it will be rebased to that version someday. So file the bug to record this issue. Version-Release number of selected component (if applicable): qemu v5.0.0-rc1-47-g53ef8a92 How reproducible: 100% Steps to Reproduce: 1. Setup a Ceph nautilus cluster. Create a namespace named hhan. Create a image in that namespace. 2. Build qemu from source(this step could be skipped when 5.0.0 build available) 3. Try to access the image via rbd, the rbd filename form will be rbd:POOL/NAMESPACE/IMAGE.... ./qemu-img info rbd:rbd/hhan/1:mon_host=HOSTNAME:id=admin:key=KEY image: json:{"driver": "raw", "file": {"pool": "rbd", "image": "1", "driver": "rbd", "user": "admin"}} file format: raw virtual size: 100 MiB (104857600 bytes) disk size: unavailable cluster_size: 4194304 No namespace attribute in json output Actual results: As above Expected results: Output: image: json:{"driver": "raw", "file": {"pool": "rbd", "image": "1", "namespace":"hhan", "driver": "rbd", "user": "admin"}} file format: raw virtual size: 100 MiB (104857600 bytes) disk size: unavailable cluster_size: 4194304 Additional info:
Seems like qemu upstream commit https://github.com/qemu/qemu/commit/19ae9ae014715529f6f50597821c5712bae6ab02 Thus once bug 1809650 has rebased at least qemu-5.0 for initial RHEL AV 8.3.0 work, then we should be able to move this to POST immediately. I'll set the ITR as 8.3.0, prio as medium, but leave this in the backlog (eg assigned to virt-maint) for now.
Danilo - one more that is fixed by the rebase - I know you have a process to move to ON_QA. So I'll let you handle. Thanks -
19ae9ae014715529f6f50597821c5712bae6ab02 seems to be included in the rebase.
Test version qemu-img-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64, this issue still exists. Version: qemu-img-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64 kernel-4.18.0-234.el8.x86_64 ceph-common-14.2.8-91.el8cp.x86_64 Steps: 1. create namespace and img in it. Server: # rbd namespace create --namespace czx # rbd namespace ls NAME czx Host: # qemu-img create -f qcow2 rbd:rbd/czx/test.qcow2 1G 2. check img info # qemu-img info rbd:rbd/czx/test.qcow2 image: json:{"driver": "qcow2", "file": {"pool": "rbd", "image": "test.qcow2", "driver": "rbd"}} file format: qcow2 virtual size: 1 GiB (1073741824 bytes) disk size: unavailable cluster_size: 65536 Format specific information: compat: 1.1 compression type: zlib lazy refcounts: false refcount bits: 16 corrupt: false Actual result: As above. Expected result: json should include namespace info. Needinfo: Please check test steps, advise me if anything not correct.
(In reply to zixchen from comment #7) > Test version qemu-img-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64, this > issue still exists. > > Version: > qemu-img-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64 > kernel-4.18.0-234.el8.x86_64 > ceph-common-14.2.8-91.el8cp.x86_64 > > Steps: > 1. create namespace and img in it. > Server: > # rbd namespace create --namespace czx > # rbd namespace ls > NAME > czx > Host: > # qemu-img create -f qcow2 rbd:rbd/czx/test.qcow2 1G > 2. check img info > # qemu-img info rbd:rbd/czx/test.qcow2 I am not sure if the image is create under the namespace 'czx' Try followings to confirm it: ~ rbd info rbd/test.qcow2 --namespace czx If there is an error, I guess that the way of qemu-img creatings rbd image with namespace is incorrect. Replace the 'qemu-img create' step with rbd create with --namespace, and then check the qemu-img info. ~ rbd create rbd/test --size 1M --namespace czx If the 'qemu-img info' returns with "'namespace':'czx'", I think the bug itself has been fixed. > image: json:{"driver": "qcow2", "file": {"pool": "rbd", "image": > "test.qcow2", "driver": "rbd"}} > file format: qcow2 > virtual size: 1 GiB (1073741824 bytes) > disk size: unavailable > cluster_size: 65536 > Format specific information: > compat: 1.1 > compression type: zlib > lazy refcounts: false > refcount bits: 16 > corrupt: false > > Actual result: > As above. > > Expected result: > json should include namespace info. > > Needinfo: > Please check test steps, advise me if anything not correct.
(In reply to Han Han from comment #8) > (In reply to zixchen from comment #7) > > Test version qemu-img-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64, this > > issue still exists. > > > > Version: > > qemu-img-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64 > > kernel-4.18.0-234.el8.x86_64 > > ceph-common-14.2.8-91.el8cp.x86_64 > > > > Steps: > > 1. create namespace and img in it. > > Server: > > # rbd namespace create --namespace czx > > # rbd namespace ls > > NAME > > czx > > Host: > > # qemu-img create -f qcow2 rbd:rbd/czx/test.qcow2 1G > > 2. check img info > > # qemu-img info rbd:rbd/czx/test.qcow2 > I am not sure if the image is create under the namespace 'czx' > Try followings to confirm it: > ~ rbd info rbd/test.qcow2 --namespace czx > > If there is an error, I guess that the way of qemu-img creatings rbd image > with namespace is incorrect. > > > Replace the 'qemu-img create' step with rbd create with --namespace, and > then check the qemu-img info. > ~ rbd create rbd/test --size 1M --namespace czx > > If the 'qemu-img info' returns with "'namespace':'czx'", I think the bug > itself has been fixed. > > > image: json:{"driver": "qcow2", "file": {"pool": "rbd", "image": > > "test.qcow2", "driver": "rbd"}} > > file format: qcow2 > > virtual size: 1 GiB (1073741824 bytes) > > disk size: unavailable > > cluster_size: 65536 > > Format specific information: > > compat: 1.1 > > compression type: zlib > > lazy refcounts: false > > refcount bits: 16 > > corrupt: false > > > > Actual result: > > As above. > > > > Expected result: > > json should include namespace info. > > > > Needinfo: > > Please check test steps, advise me if anything not correct. Version: qemu-kvm-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64 Retry with those steps, but result is the same, this issue is not fixed. 1. create img under namespace czx; # rbd create rbd/testimg --size 1M --namespace czx 2. check img info: # qemu-img info rbd:rbd/czx/test_img image: json:{"driver": "raw", "file": {"pool": "rbd", "image": "test_img", "driver": "rbd"}} file format: raw virtual size: 1 MiB (1048576 bytes) disk size: unavailable cluster_size: 4194304 Actual result is as above. Expected result : # qemu-img info rbd:rbd/czx/test_img image: json:{"driver": "raw", "file": {"pool": "rbd", "image": "test_img","namespace":"czx", "driver": "rbd"}} file format: raw virtual size: 1 MiB (1048576 bytes) disk size: unavailable cluster_size: 4194304 Need info: Please check the problem.
Reproduced using qemu upstream and proposed a patch to fix this issue: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg05047.html
Test with qemu-kvm-5.1.0-8.module+el8.3.0+8141+3cd9cd43, qemu-img info shows namespace info. Version: qemu-kvm-5.1.0-8.module+el8.3.0+8141+3cd9cd43 kernel-4.18.0-238.el8.x86_64 ceph-common-14.2.8-91.el8cp.x86_64 Test Steps: Create img with rbd cmd 1. create img under namespace czx; # rbd create rbd/testimg --size 1M --namespace czx 2. check img info: # qemu-img info rbd:rbd/czx/testimg image: json:{"driver": "raw", "file": {"pool": "rbd", "image": "testimg", "driver": "rbd", "namespace": "czx"}} file format: raw virtual size: 1 MiB (1048576 bytes) disk size: unavailable cluster_size: 4194304 Create img with qemu cmd 1. # qemu-img create -f qcow2 rbd:rbd/czx/test_czx.qcow2 1M Formatting 'rbd:rbd/czx/test_czx.qcow2', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 lazy_refcounts=off refcount_bits=16 2. # qemu-img info rbd:rbd/czx/test_czx.qcow2 image: json:{"driver": "qcow2", "file": {"pool": "rbd", "image": "test_czx.qcow2", "driver": "rbd", "namespace": "czx"}} file format: qcow2 virtual size: 1 MiB (1048576 bytes) disk size: unavailable cluster_size: 65536 Format specific information: compat: 1.1 compression type: zlib lazy refcounts: false refcount bits: 16 corrupt: false Expected result: Same as above actual result. As soon as the bug is ON_QA, I can change the status to verified.
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 (virt:8.3 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/RHBA-2020:5137