Description of problem: The rbd_list method in virsh vol-list command is broken. Its just showing the first volume in result array. Version-Release number of selected component (if applicable): libvirt 5.5.0 Ceph Nautilus 14.2.1 How reproducible: Recently checked and worked fine with libvirt 5.4.0 and Ceph Mimic 13.2.6 Steps to Reproduce: 1. Create a CEPH RBD Storage Pool echo "<pool type='rbd'> <name>my_volumes</name> <source> <host name='host1' port='6789'/> <host name='host2' port='6789'/> <host name='host3' port='6789'/> <name>vm_volumes</name> <auth type='ceph' username='libvirt'> <secret usage='client.libvirt secret'/> </auth> </source> </pool>" >/etc/libvirt/storage/my_volumes.xml 2. Register Pool virsh pool-define /etc/libvirt/storage/my_volumes.xml virsh pool-built my_volumes virsh pool-start my_volumes virsh pool-autostart my_volumes 3. Create RAW volumes on Ceph RBD qemu-img create -f raw rbd:my_volumes/vm1-root 1G qemu-img create -f raw rbd:my_volumes/vm2-root 1G qemu-img create -f raw rbd:my_volumes/vm3-root 1G qemu-img create -f raw rbd:my_volumes/vm4-root 1G Actual results: vol-list just showing the first volume from the ceph rbd: virsh vol-list my_volumes Name Path ------------------------------------------------- vm1-root my_volumes/vm1-root Expected results: List all existing volumes like it was before virsh vol-list vm_volumes Name Path ------------------------------------------------- vm1-root my_volumes/vm1-root vm2-root my_volumes/vm2-root vm3-root my_volumes/vm3-root vm4-root my_volumes/vm4-root Additional info: In theory it can have a relation to this commit: https://github.com/libvirt/libvirt/commit/3aa190f2a43a632b542a6ba751a6c3ab4d51f1dd#diff-107c5451015e5980c90048ff615becb8 Since it kicks in if Ceph >= 14.0
CCing danpb who wrote the patch, and dillaman who had patches around the same time. Maybe someone has a setup to test
I believe this patch should fix it, but I have not tested it: https://www.redhat.com/archives/libvir-list/2019-July/msg00811.html
I will test whatever you like me to test. We urgently need to get all Ceph RBD features working again. Can you give me direct links to your diff patches, so i can add them to my quilt patchsets.
Pushed to git master as: commit 9b7c4048fa0559fd81d57b7f7d13b1dccd6a99b2 Author: Ján Tomko <jtomko> CommitDate: 2019-07-12 17:09:42 +0200 storage: rbd: actually index the array when iterating over it https://bugzilla.redhat.com/show_bug.cgi?id=1729292 Fixes: 3aa190f2a43a632b542a6ba751a6c3ab4d51f1dd Signed-off-by: Ján Tomko <jtomko> Reviewed-by: Daniel P. Berrangé <berrange> git describe: v5.5.0-123-g9b7c4048fa It can be fetched using the URLs mentioned here: https://libvirt.org/git/?p=libvirt.git;a=summary or you can wait a few minutes until it shows up on the github mirror.
And with the latest commit it could even compile! commit b632e00ffbfee7b11074bf4ca5f4399e929bbe53 Author: Ján Tomko <jtomko> CommitDate: 2019-07-12 17:51:39 +0200 storage: rbd: do not attempt to dereference a non-pointer My commit 9b7c4048fa0559fd81d57b7f7d13b1dccd6a99b2 was too blind and my librbd was not new enough to actually compile this part. Signed-off-by: Ján Tomko <jtomko> git describe: v5.5.0-126-gb632e00ffb
awww, you reverted? :-( Recent ceph rbd build i use: librbd-devel-14.2.1-1
I can confirm that your patch fixes my issue.