Bug 1431543

Summary: cannot use VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE flag in listAllStoragePools()
Product: [Community] Virtualization Tools Reporter: lcheng
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NEXTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jdenemar, libvirt-maint, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-13 08:48:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lcheng 2017-03-13 08:07:09 UTC
Description:
can not use VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE flag in listAllStoragePools().


Version-Release number of selected component (if applicable):
libvirt-python-3.1.0-1.el7.x86_64
libvirt-3.1.0-2.el7.x86_64


How reproducible:
100%

Steps:
1. Define a pool.
# virsh pool-list
 Name                 State      Autostart 
-------------------------------------------
 dir_pool             active     no 

2. Run follow script in python
>>> import libvirt
>>> conn = libvirt.open()
>>> conn.numOfStoragePools()
1
>>> conn.listAllStoragePools(libvirt.VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE)
libvirt: Storage Driver error : unsupported flags (0x40000) in function storageConnectListAllStoragePools
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 5046, in listAllStoragePools
    raise libvirtError("virConnectListAllStoragePools() failed", conn=self)
libvirt.libvirtError: unsupported flags (0x40000) in function storageConnectListAllStoragePools


Actual results:
As above

Expected results:
List storage pool.

Additional info:

Comment 2 Jiri Denemark 2017-03-13 08:32:30 UTC
Sent for review: https://www.redhat.com/archives/libvir-list/2017-March/msg00522.html

Comment 3 Jiri Denemark 2017-03-13 08:38:46 UTC
RHEL has no support for Virtuozzo storage, I'm moving this bug upstream.

Comment 4 Jiri Denemark 2017-03-13 08:48:30 UTC
Fixed by

commit fafe9d7c74dacbf86d7a5e8aaaabfe27b5df77a3
Refs: v3.1.0-113-gfafe9d7c7
Author:     Jiri Denemark <jdenemar>
AuthorDate: Mon Mar 13 09:20:35 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Mon Mar 13 09:29:37 2017 +0100

    Enable forgotten VIR_CONNECT_LIST_STORAGE_POOLS_* flags

    VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE and
    VIR_CONNECT_LIST_STORAGE_POOLS_ZFS were added to libvirt but the listing
    API was not properly updated to use them.

    https://bugzilla.redhat.com/show_bug.cgi?id=1431543

    Signed-off-by: Jiri Denemark <jdenemar>