[libvirt-php] libvirt_list_storagepools() gives an error if all the storage pools on the host node are active

Hi, While using the function libvirt_list_storagepools() I found that if all the storage pools on the host node are active, the function doesn't return the list of storage pools but it gives the following error instead: names in virConnectListDefinedStoragePools must not be NULL Expected result, return an array of all the storage pools names on the host node regardless of their status (active or inactive). virsh output for the equivalent command: $ virsh pool-list --all Name State Autostart -------------------------------------------- default active yes resources active yes templates active yes virtual_machines_hdd active yes virtual_machines_ssd active yes Also in the same scenario (all storage pools active) libvirt_list_inactive_storagepools() gives the same error detailed above. I wouldn't say this is actually wrong but wouldn't it be better if these functions returns FALSE instead if there are no results (-no inactive storage pools in this case-)? System information: OS: Debian Buster PHP version (fast cgi): 7.3.14 Libvirt PHP version: latest from git repository @ gitlab Libvirt version: 5.0.0 KVM host libvirt version: 5.9.0 Thanks, Fernando

On 4/23/20 11:02 PM, Fernando Casas Schössow wrote:
Hi,
While using the function libvirt_list_storagepools() I found that if all the storage pools on the host node are active, the function doesn't return the list of storage pools but it gives the following error instead:
Hey, I've switched the function to use more modern listing API. The change us pushed, so can you please fetch the master and see if that helped? Thanks, Michal

Hi Michal, Thanks for quick reply. Let me pull from master, rebuild the container and test it. I will report back with the result. Thanks, Fernando On vie, abr 24, 2020 at 4:16 PM, Michal Privoznik <mprivozn@redhat.com> wrote:
On 4/23/20 11:02 PM, Fernando Casas Schössow wrote:
Hi,
While using the function libvirt_list_storagepools() I found that if all the storage pools on the host node are active, the function doesn't return the list of storage pools but it gives the following error instead:
Hey, I've switched the function to use more modern listing API. The change us pushed, so can you please fetch the master and see if that helped?
Thanks, Michal
participants (2)
-
Fernando Casas Schössow
-
Michal Privoznik