RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1349441 - find-storage-pool-sources-as/find-storage-pool-sources doesn't work for gluster type pool
Summary: find-storage-pool-sources-as/find-storage-pool-sources doesn't work for glust...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-23 13:03 UTC by yisun
Modified: 2017-08-01 23:51 UTC (History)
7 users (show)

Fixed In Version: libvirt-3.1.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:09:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description yisun 2016-06-23 13:03:14 UTC
Description:
find-storage-pool-sources-as/find-storage-pool-sources doesn't work for gluster type pool


versions:
libvirt-1.3.4-1.el7.x86_64

How reproducible:
100%

Steps:
1.
# virsh pool-dumpxml gluster-vol2
<pool type='gluster'>
  <name>gluster-vol2</name>
  <uuid>c41bfbbc-ab34-4533-87ce-98a48aa4c6f3</uuid>
  <capacity unit='bytes'>214643507200</capacity>
  <allocation unit='bytes'>116166967296</allocation>
  <available unit='bytes'>98476539904</available>
  <source>
    <host name='10.66.4.200'/>
    <dir path='/'/>
    <name>gluster-vol2</name>
  </source>
</pool>

2. # virsh pool-list --type gluster
 Name                 State      Autostart
-------------------------------------------
 gluster-vol2         active     no    


3. # virsh find-storage-pool-sources-as gluster 10.66.4.200
<sources>
</sources>

4. # cat sources.xml
<source>
<host name='10.66.4.200'/>
</source>

5. # virsh find-storage-pool-sources gluster sources.xml
<sources>
</sources>


Expected result:
In step 3&5, the find-storage-pool-sources[-as] cmd should return info as:
  <source>
    <host name='10.66.4.200'/>
    <dir path='/'/>
    <name>gluster-vol2</name>
  </source>


Actual result:
It returns null.

Additional info:
BZ 1072714 has fixed this issue with gluster backend storage used as netfs pool.

Comment 1 Peter Krempa 2016-12-12 14:38:43 UTC
The series for BZ 1072714 implemented the functionality for 'gluster' pools too.

I currently can't reproduce it in my setup:
 $  virsh find-storage-pool-sources-as gluster virt-gluster-node1.usersys.redhat.com
<sources>
  <source>
    <host name='virt-gluster-node1.usersys.redhat.com'/>
    <dir path='vol0'/>
  </source>
</sources>

At any rate. Libvirt merely parses output of:

gluster --xml --log-file=/dev/null volume info all --remote-host=virt-gluster-node1.usersys.redhat.com

I'm closing this bug since it appears to work for me. If you manage to reproduce this bug, please reopen it and attach output of the gluster tool as libvirt doesn't really do much here.

Comment 3 yisun 2016-12-26 10:24:04 UTC
Hi Peter, 
I repopen this issue according to above comment. Still cannot see any sources as following step shows. 
[root@localhost ~]# virsh find-storage-pool-sources-as gluster xxx.xxx.xxx.xxx
<sources>
</sources> <==== nothing here

And I added the output of 
gluster --xml --log-file=/dev/null volume info all --remote-host=xxx.xxx.xxx.xxx

please have a check if it's a problem. thx.

Comment 4 yisun 2016-12-28 06:16:05 UTC
Hi Peter,
Seems the reason is that your compile env has the glusterfs-cli, and then the rpm you build enabled related functions. And the compile env for libvirt rpm in brewweb doesn't have glusterfs-cli, which make related functions disabled. So this may be a issue when build brewweb rpms. pls have a check.

Comment 5 Peter Krempa 2017-01-09 12:41:01 UTC
Good point. It appears that the 'gluster' command line tool was moved into it's own sub-package and I was not testing the official build. This indeed requires some fixing.

Comment 6 Peter Krempa 2017-01-18 10:10:33 UTC
Fixed upstream:

commit dd335d03e819284016e650923dadf6806b8ac03a
Author: Peter Krempa <pkrempa>
Date:   Tue Jan 10 18:08:44 2017 +0100

    spec: Depend on the gluster command line tool
    
    The gluster command line tool that is used to lookup storage pool
    sources moved from the gluster-client package to gluster-cli.

Comment 8 yisun 2017-03-27 04:31:18 UTC
Verified on libvirt-3.1.0-2.el7.x86_64
According to comment 1, libvirt just calls
gluster --xml --log-file=/dev/null volume info all --remote-host=virt-gluster-node1.usersys.redhat.com

So, I prepare a gluster server yisun.com
and test with find-storage-pool-sources-as 

Steps:
1. ## virsh pool-dumpxml gluster
<pool type='gluster'>
  <name>gluster</name>
  <uuid>1fb76004-6e19-4ba1-8ac6-43f5901675f4</uuid>
  <capacity unit='bytes'>0</capacity>
  <allocation unit='bytes'>0</allocation>
  <available unit='bytes'>0</available>
  <source>
    <host name='yisun.com'/>
    <dir path='/'/>
    <name>gluster-vol1</name>
  </source>
</pool>

2. virsh vol-list gluster
 Name                 Path                                    
------------------------------------------------------------------------------
 .trashcan            gluster://yisun.com/gluster-vol1/.trashcan
 1.img                gluster://yisun.com/gluster-vol1/1.img 
 2.img                gluster://yisun.com/gluster-vol1/2.img 
 luks_1.img           gluster://yisun.com/gluster-vol1/luks_1.img
 rh7.img              gluster://yisun.com/gluster-vol1/rh7.img

3. ## virsh find-storage-pool-sources-as gluster yisun.com
<sources>
  <source>
    <host name='yisun.com'/>
    <dir path='gluster-vol1'/>
  </source>
</sources>

Comment 9 yisun 2017-03-27 04:32:59 UTC
Also test with find-storage-pool-source
## cat sources.xml 
<source>
    <host name='yisun.com'/>
</source>
 

## virsh find-storage-pool-sources gluster sources.xml
<sources>
  <source>
    <host name='yisun.com'/>
    <dir path='gluster-vol1'/>
  </source>
</sources>

Comment 10 errata-xmlrpc 2017-08-01 17:09:12 UTC
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/RHEA-2017:1846

Comment 11 errata-xmlrpc 2017-08-01 23:51:16 UTC
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/RHEA-2017:1846


Note You need to log in before you can comment on or make changes to this bug.