Bug 921426
Summary: | The other opiton of the 'virsh find-storage-pool-sources-as' command didn't work while appointed the storage type logical | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | zhenfeng wang <zhwang> |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | cwei, dyuan, mzhan, rbalakri, yanyang, yisun, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.14-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:42:11 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
zhenfeng wang
2013-03-14 07:51:47 UTC
From the manpage of the virsh find-storage-pool-as command, we knew that ,this command support the following option # virsh find-storage-pool-sources-as --help OPTIONS [--type] <string> type of storage pool sources to find [--host] <string> optional host to query [--port] <string> optional port to query [--initiator] <string> optional initiator IQN to use for query I have a doubt that which type of the storage support the --host --port option now,and what's the function of the --port option ? thanks I disagree with the Expected results, although admittedly it's not very clear from the virsh man page, which is something I will use this bz to rectify. If you look at the API eventually called : http://libvirt.org/html/libvirt-libvirt-storage.html#virConnectFindStoragePoolSources You will see that the API returns all possible pools for a given type dependant upon the 'srcSpec' XML. As it turns out it's up to the individual storage backend modules to provide the search service. Currently only 4 provide that - netfs, gluster, logical, and iscsi. Of those, the "host" is required for only netfs, gluster, and iscsi. The "port" and "initiator" are only used for iscsi pool searches. I disagree the command should fail if something that's not necessary is provided; however, if something is required, but not provided, then yes an error is generated. For example: # virsh find-storage-pool-sources-as iscsi error: Failed to find any iscsi pool sources error: invalid argument: hostname and device path must be specified for iscsi sources # Although the error message is a bit incorrect as only host is required: # virsh find-storage-pool-sources-as iscsi 192.168.122.1 <sources> <source> <host name='192.168.122.1' port='3260'/> <device path='iqn.2013-12.com.example:iscsi-chap-lclpool'/> </source> <source> <host name='192.168.122.1' port='3260'/> <device path='iqn.2013-12.com.example:iscsi-chap-netpool'/> </source> <source> <host name='192.168.122.1' port='3260'/> <device path='iqn.2013-12.com.example:iscsi-chap-nopool'/> </source> </sources> For a netfs and gluster pool only the host is required For a logical pool the host, port, and initiator are ignored. Patches posted upstream: http://www.redhat.com/archives/libvir-list/2015-February/msg01189.html Patches pushed upstream commit id: 567bd0fa57025efe8eda8f39e48d957842e39d43 $ git describe 567bd0fa57025efe8eda8f39e48d957842e39d43 v1.2.13-31-g567bd0f $ Verified On Versions: libvirt-1.2.15-2.el7.x86_64 verify steps: 1. check the error message when no host info provided for iscsi pool discovery # virsh find-storage-pool-sources-as iscsi error: Failed to find any iscsi pool sources error: invalid argument: hostname must be specified for iscsi sources <==========It's modifed. 2. check the man page content about "find-storage-pool-sources" #man virsh ... find-storage-pool-sources type [srcSpec] Returns XML describing all possible available storage pool sources that could be used to create or define a storage pool of a given type. If srcSpec is provided, it is a file that contains XML to further restrict the query for pools. Not all storage pools support discovery in this manner. Furthermore, for those that do support discovery, only specific XML elements are required in order to return valid data, while other elements and even attributes of some elements are ignored since they are not necessary to find the pool based on the search criteria. The following lists the supported type options and the expected minimal XML elements used to perform the search. For a "netfs" or "gluster" pool, the minimal expected XML required is the <host> element with a "name" attribute describing the IP address or hostname to be used to find the pool. The "port" attribute will be ignored as will any other provided XML elements in srcSpec. For a "logical" pool, the contents of the srcSpec file are ignored, although if provided the file must at least exist. For an "iscsi" pool, the minimal expect XML required is the <host> element with a "name" attribute describing the IP address or hostname to be used to find the pool (the iSCSI server address). Optionally, the "port" attribute may be provided, although it will default to 3260. Optionally, an <initiator> XML element with a "name" attribute may be provided to further restrict the iSCSI target search to a specific initiator for multi-iqn iSCSI storage pools. find-storage-pool-sources-as type [host] [port] [initiator] Rather than providing srcSpec XML file for find-storage-pool-sources use this command option in order to have virsh generate the query XML file using the optional arguments. The command will return the same output XML as find-storage-pool-sources. Use host to describe a specific host to use for networked storage, such as netfs, gluster, and iscsi type pools. Use port to further restrict which networked port to utilize for the connection if required by the specific storage backend, such as iscsi. Use initiator to further restrict the iscsi type pool searches to specific target initiators. ... <===== It's clear enough to explain the host/port/initiator usage. 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://rhn.redhat.com/errata/RHBA-2015-2202.html |