Bug 595609 - [Storage] unreasonable error prompt string
[Storage] unreasonable error prompt string
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity low
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-25 03:41 EDT by Osier Yang
Modified: 2010-11-11 09:48 EST (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0_8_1-10_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 09:48:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to change the word "hypervisor" to "connection driver" for VIR_ERR_NO_SUPPORT (747 bytes, patch)
2010-05-30 04:52 EDT, Justin Clift
no flags Details | Diff

  None (edit)
Description Osier Yang 2010-05-25 03:41:30 EDT
Description of problem:
while trying to create volume on ISCSI pool. the error prompt string will be like:

error: this function is not supported by the hypervisor: storage pool does not support volume creation

Actually the storage driver has no relationship with hypervisor, just has relationship with the storage daemons, such as "iscsid".

so the error msg "error: this function is not supported by the hypervisor:"
is not reasonable.

1296     if (!backend->createVol) {
1297         virStorageReportError(VIR_ERR_NO_SUPPORT,
1298                               "%s", _("storage pool does not support volume "
1299                                       "creation"));
1300         goto cleanup;
1301     }

the upper peice of code is from "storage_driver.c".


Version-Release number of selected component (if applicable):
[root@dhcp-66-70-131 work]# rpm -q libvirt
libvirt-0.8.1-6.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Daniel Berrange 2010-05-25 07:05:24 EDT
> error: this function is not supported by the hypervisor: storage pool does not
support volume creation

We just need to change virterror.c and alter 'this function is not supported by the hypervisor' to 'this function is not supported by the connection driver'
Comment 3 Justin Clift 2010-05-30 04:52:11 EDT
Created attachment 417993 [details]
Patch to change the word "hypervisor" to "connection driver" for VIR_ERR_NO_SUPPORT

This is just a trivial patch (2 changed lines) against current git master, changing the error string as per Daniel Berrange's comment.
Comment 4 RHEL Product and Program Management 2010-06-07 11:59:14 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 6 Dave Allan 2010-06-23 21:31:28 EDT
libvirt-0_8_1-10_el6 has been built in RHEL-6-candidate with the fix.

Dave
Comment 8 Alex Jia 2010-07-08 01:59:13 EDT
The bug has been fixed on RHEL6-beta with libvirt-0.8.2.tar.gz source code.


# pwd
/home/ajia/sourcecode/libvirt-0.8.2

#vim ./src/util/virterror.c

 744 const char *
 745 virErrorMsg(virErrorNumber error, const char *info)
 746 {
 747     const char *errmsg = NULL;
 748 
 749     switch (error) {
             ......               
 761         case VIR_ERR_NO_SUPPORT:
 762             if (info == NULL)
 763                 errmsg = _("this function is not supported by the connection driver");
 764             else
 765                 errmsg = _("this function is not supported by the connection driver: %s");
 766             break;
             ......
Comment 9 wangyimiao 2010-09-07 23:32:21 EDT
Verified this bug with RHEL6 RC build and it passed:
libvirt-0.8.1-27.el6.x86_64
qemu-img-0.12.1.2-2.113.el6.x86_64
qemu-kvm-0.12.1.2-2.113.el6.x86_64
kernel-2.6.32-71.el6.x86_64

Steps:
1.
# cat iscsipool.xml 
<?xml version='1.0' encoding='UTF-8'?>
<pool type='iscsi'>
  <name>iscsi</name>
  <source>
    <host name='10.66.90.115'/>
    <device path='iqn.1992-08.com.netapp:sn.135053389'/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>
2.# cat vol.xml 
  <volume>
  <name>lv_test</name>
  <capacity>2080374784</capacity>
  <allocation>2080374784</allocation>
  <target>
    <path>/dev/disk/by-path/lv_test</path>
  </target>
</volume>
3.# virsh pool-define iscsipool.xml 
Pool iscsi defined from iscsipool.xml
4.# virsh pool-start iscsi
Pool iscsi started
5.
# virsh vol-create iscsi vol.xml
error: Failed to create vol from vol.xml
error: this function is not supported by the connection driver: storage pool does not support volume creation
Comment 10 releng-rhel@redhat.com 2010-11-11 09:48:28 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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