Description of problem: Pool-list should support list iscsi-direct pools with --type iscsi-direct option Version-Release number of selected component (if applicable): libvirt-5.4.0-1.module+el8.1.0+3304+7eb41d5f.x86_64 qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee.x86_64 kernel-4.18.0-107.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. Create a iscsi-direct pool. # virsh pool-dumpxml iscsi-direct <pool type='iscsi-direct'> <name>iscsi-direct</name> <uuid>2b621385-f734-4b98-8131-0fc17ed29e67</uuid> <capacity unit='bytes'>64424704512</capacity> <allocation unit='bytes'>64424704512</allocation> <available unit='bytes'>0</available> <source> <host name='**IP**'/> <device path='iqn.2017-12.com.virttest:emulated-iscsi-noauth.target2'/> <initiator> <iqn name='iqn.2017-12.com.example:client'/> </initiator> </source> </pool> 2. List all pools. # virsh pool-list --all Name State Autostart ------------------------------------ default active yes images active yes iscsi-direct active no 3. List dir pools with --type dir. # virsh pool-list --type dir Name State Autostart ------------------------------- default active yes images active yes 4. List iscsi-direct pools with --type iscsi-direct. # virsh pool-list --type iscsi-direct Name State Autostart --------------------------- Actual results: pool-list can't list pools with --type iscsi-direct option Expected results: Pool-list should support list iscsi-direct pools with --type iscsi-direct option Additional info: # man virsh ... pool-list [--inactive] [--all] [--persistent] [--transient] [--autostart] [--no-autostart] [[--details] [--uuid] [--name] [<type>] ... You may also want to list pools with specified types using type, the pool types must be separated by comma, e.g. --type dir,disk. The valid pool types include 'dir', 'fs', 'netfs', 'logical', 'disk', 'iscsi', 'scsi', 'mpath', 'rbd', 'sheepdog' and 'gluster'. ...
The iscsi-direct pool type is missing in VIR_CONNECT_LIST_STORAGE_POOLS groups: src/libvirt-storage.c: 84 * The last group of @flags is provided to filter the pools by the types, 85 * the flags include: 86 * VIR_CONNECT_LIST_STORAGE_POOLS_DIR 87 * VIR_CONNECT_LIST_STORAGE_POOLS_FS 88 * VIR_CONNECT_LIST_STORAGE_POOLS_NETFS 89 * VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL 90 * VIR_CONNECT_LIST_STORAGE_POOLS_DISK 91 * VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI 92 * VIR_CONNECT_LIST_STORAGE_POOLS_SCSI 93 * VIR_CONNECT_LIST_STORAGE_POOLS_MPATH 94 * VIR_CONNECT_LIST_STORAGE_POOLS_RBD 95 * VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG
One upstream patch: https://www.redhat.com/archives/libvir-list/2019-July/msg00603.html
v2 to add more missing flags in comment and virsh mannual: https://www.redhat.com/archives/libvir-list/2019-July/msg00605.html
I've pushed the patches upstream: 3efdffc450 storage: Add iscsi-direct pool list type flag 355fb766c9 virsh.pod: Add zfs and vstorage pool types 8462467cf7 storage: Add missing pool type flags in comment v5.5.0-151-g3efdffc450
Created attachment 1602661 [details] Code coverage report Version-Release number of selected component (if applicable): libvirt-5.6.0-1.virtcov.el8.x86_64 qemu-kvm-4.0.0-6.module+el8.1.0+3736+a2aefea3.x86_64 kernel-4.18.0-129.el8.x86_64 Steps to verify: 1. Create a iscsi-direct pool. # virsh pool-dumpxml iscsi-direct <pool type='iscsi-direct'> <name>iscsi-direct</name> <uuid>2b621385-f734-4b98-8131-0fc17ed29e67</uuid> <capacity unit='bytes'>64424704512</capacity> <allocation unit='bytes'>64424704512</allocation> <available unit='bytes'>0</available> <source> <host name='10.66.4.119'/> <device path='iqn.2016-03.com.virttest:logical-pool.target'/> <initiator> <iqn name='iqn.2017-12.com.example:client'/> </initiator> </source> </pool> 2. List iscsi-direct pools with --type iscsi-direct. # virsh pool-list --type iscsi-direct Name State Autostart ------------------------------------ iscsi-direct active no Work as expected
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, 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-2019:3723