Bug 823850 - find-storage-pool-sources/ find-storage-pool-sources-as can't return XML describing of netfs/iscsi pool
find-storage-pool-sources/ find-storage-pool-sources-as can't return XML desc...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Gunannan Ren
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 06:10 EDT by zhpeng
Modified: 2013-09-08 20:03 EDT (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-0rc1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:15:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhpeng 2012-05-22 06:10:35 EDT
Description of problem:
find-storage-pool-sources/ find-storage-pool-sources-as can't return XML describing of netfs/iscsi pool

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
virsh # pool-list
Name                 State      Autostart
-----------------------------------------
bbb                  active     yes      ------> logical pool
default              active     yes      
iscsi                active     no       ------> iscsi pool
mnt                  active     yes      
nfs                  active     no       ------> netfs pool

virsh # find-storage-pool-sources logical
<sources>
  <source>
    <device path='/dev/sdb'/>
    <name>bbb</name>
    <format type='lvm2'/>
  </source>
</sources>

virsh # find-storage-pool-sources iscsi
error: Failed to find any iscsi pool sources
error: (storage_source_specification):1: Document is empty
(null)
^

virsh # find-storage-pool-sources netfs
error: Failed to find any netfs pool sources
error: (storage_source_specification):1: Document is empty
(null)
^

Actual results:
Can't return XML describing of netfs/iscsi pool

Expected results:
Works well

Additional info:
Comment 2 Gunannan Ren 2012-06-01 04:26:52 EDT
The --srcSpec should be optional, the code doesn't check the value of it before passing it, so it reports a xml parsing error:(storage_source_specification):1: Document is empty (null).
Comment 4 Gunannan Ren 2012-07-16 11:22:06 EDT
patch sent to upstream
https://www.redhat.com/archives/libvir-list/2012-July/msg00659.html
Comment 5 Gunannan Ren 2012-08-01 23:11:54 EDT
commit 4057048891dc853da7793e7978e8c9c38a13934a
Author: Guannan Ren <gren@redhat.com>
Date:   Tue Jul 31 16:56:41 2012 +0800

    storage: netfs and iscsi need option srcSpec for resource discovery
    
    The option 'srcSpec' to virsh command find-storage-pool-sources
    is optional for logical type of storage pool, but mandatory for
    netfs and iscsi type.
    When missing the option for netfs and iscsi, libvirt reports XML
    parsing error due to null string option srcSpec.
Comment 7 zhe peng 2012-08-24 03:59:34 EDT
can reproduce this with libvirt-0.10.0-0rc0.el6

verify with libvirt-0.10.0-0rc1.el6

step:
  1: prepare netfs & iscsi pool
#virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
A                    active     no          ----iscsi 
default              active     no        
mpath                inactive   no        
mylvm                active     yes         ----logical
nfs                  active     yes         ----netfs

#virsh find-storage-pool-sources iscsi
error: Failed to find any iscsi pool sources
error: invalid argument: hostname and device path must be specified for iscsi sources

#virsh find-storage-pool-sources iscsi iscsi.xml
<sources>
  <source>
    <host name='10.66.90.100'/>
    <device path='iqn.2001-05.com.equallogic:0-8a0906-12a1f7d03-0daf49b25a84ee02-s3-kyla-131842'/>
  </source>
  <source>
    <host name='10.66.90.100'/>
    <device path='iqn.2001-05.com.equallogic:0-8a0906-9951f7d03-34cf49b25f04f94b-libvirt-2-150313'/>
  </source>
  <source>
    <host name='10.66.90.100'/>
    <device path='iqn.2001-05.com.equallogic:0-8a0906-6eb1f7d03-30cf49b25f24f94d-libvirt-1-150313'/>
  </source>
</sources>



#virsh find-storage-pool-sources netfs
error: Failed to find any netfs pool sources
error: invalid argument: hostname must be specified for netfs sources

#virsh find-storage-pool-sources netfs nfs.xml
<sources>
  <source>
    <host name='10.66.6.166'/>
    <dir path='/common'/>
    <format type='nfs'/>
  </source>
</sources>


verification passed.
Comment 8 errata-xmlrpc 2013-02-21 02:15:14 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

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