Bug 706827

Summary: RFE: disable 'add volume' button for unsupported pool types
Product: Red Hat Enterprise Linux 6 Reporter: Min Zhan <mzhan>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: dyuan, hjiang, llim, mshao, mzhan, rwu, whuang, yupzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
No description necessary
Story Points: ---
Clone Of: 704934 Environment:
Last Closed: 2011-12-06 16:14:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 704934    
Bug Blocks:    

Description Min Zhan 2011-05-23 07:18:12 UTC
+++ This bug was initially created as a clone of Bug #704934 +++

Description of problem:
First create a disk pool in virt-manager, then click New volume, an error display

Version-Release number of selected component (if applicable):
virt-manager-0.6.1-14.el5
libvirt-0.8.2-18.el5

How reproducible:
Always

Steps to Reproduce:
1. First create a disk pool in virt-manager

# virsh pool-dumpxml disk
<pool type='disk'>
  <name>disk</name>
  <uuid>10704474-12dd-a75a-fc88-02f9edb07a91</uuid>
  <capacity>500105249280</capacity>
  <allocation>0</allocation>
  <available>500105248768</available>
  <source>
    <device path='/dev/sdb'>
    <freeExtent start='512' end='500105249280'/>
    </device>
    <format type='sun'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

2. In disk pool, click New Volume button to create a vol

  
Actual results:

An error display:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 479, in add_vol
    self.addvol = vmmCreateVolume(self.config, self.conn, pool)
  File "/usr/share/virt-manager/virtManager/createvol.py", line 59, in __init__
    self.vol_class = Storage.StoragePool.get_volume_for_pool(parent_pool.get_type())
  File "/usr/lib/python2.4/site-packages/virtinst/Storage.py", line 236, in get_volume_for_pool
    return pool_class.get_volume_class()
  File "/usr/lib/python2.4/site-packages/virtinst/Storage.py", line 585, in get_volume_class
    raise NotImplementedError(_("Disk volume creation is not implemented."))
NotImplementedError: Disk volume creation is not implemented.


Expected results:
The vol for disk pool can be created successfully

Additional info:

--- Additional comment from mzhan on 2011-05-15 23:39:42 EDT ---

Environment supplement:
# uname -a
Linux localhost.localdomain 2.6.18-259.el5xen #1 SMP Fri Apr 29 01:19:02 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

xen-3.0.3-130.el5

--- Additional comment from mzhan on 2011-05-16 01:02:48 EDT ---

Similar error happens when creating a volume in iscsi pool

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 482, in add_vol
    self.addvol.set_parent_pool(pool)
  File "/usr/share/virt-manager/virtManager/createvol.py", line 93, in set_parent_pool
    self.vol_class = Storage.StoragePool.get_volume_for_pool(self.parent_pool.get_type())
  File "/usr/lib/python2.4/site-packages/virtinst/Storage.py", line 236, in get_volume_for_pool
    return pool_class.get_volume_class()
  File "/usr/lib/python2.4/site-packages/virtinst/Storage.py", line 644, in get_volume_class
    raise NotImplementedError(_("iSCSI volume creation is not "
NotImplementedError: iSCSI volume creation is not implemented.

Comment 1 Min Zhan 2011-05-23 07:19:57 UTC
In rhel6.1, New volumn button can take effect in Disk pool, but still can not work with iSCSI pool. So change this bug title as "Bug 706827 - RFE: New volume button should work well for iSCSI pool in virt-manager".

Comment 2 Min Zhan 2011-06-01 09:16:49 UTC
Same problem when clicking New Volumn button for SCSI pool.

Comment 3 Cole Robinson 2011-06-10 22:38:02 UTC
libvirt just doesn't support creating iscsi or scsi volumes and probably never will (scsi doesn't really make sense, iscsi is difficult to support). I think we can change the UI to disable the 'add volume' button if selecting this type of pool.

Comment 5 Cole Robinson 2011-07-28 15:29:35 UTC
Fixed in virt-manager-0.9.0-2.el6

Comment 7 Huming Jiang 2011-08-09 11:42:09 UTC
Could not test this bug because it has been blocked by Bug 729226

Comment 8 Huming Jiang 2011-09-02 06:20:04 UTC
Verified with the following components:
kernel-2.6.32-191.el6.x86_64
qemu-kvm-0.12.1.2-2.184.el6.x86_64
libvirt-0.9.4-7.el6.x86_64
python-virtinst-0.600.0-2.el6.noarch
virt-manager-0.9.0-6.el6.x86_64.

Steps:
Add SCSI storage pool:
1 Launch virt-manager: #virt-manager.
2 Click Edit->Host Details.
3 Click Storage tab on Host Details dialogue.
4 Click Add pool button.
5 Fill out pool name and select the type 'scsi', then click Forward button.
6 Fill out Target Path and Source Path.
7 Click Finish button.
Then we will find the "add volume" button is disable.

Add ISCSI storage pool: # iscsiadm --mode discovery --type sendtargets --portal 10.66.90.115
10.66.90.115:3260,1000 iqn.1992-08.com.netapp:sn.135053389
10.66.90.116:3260,1001 iqn.1992-08.com.netapp:sn.135053389
1 Launch virt-manager: #virt-manager.
2 Click Edit->Host Details.
3 Click Storage tab on Host Details dialogue.
4 Click Add pool button.
5 Fill out pool name and select the type 'iscsi', then click Forward button.
6 Fill out Target Path: /dev/disk/by-path, Host Name: 10.66.90.100, Source Path:iqn.1992-08.com.netapp:sn.135053389
7 Click Finish button.
Then we will find the "add volume" button is disable.

Comment 9 Cole Robinson 2011-11-07 16:40:03 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 10 errata-xmlrpc 2011-12-06 16:14:11 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.

http://rhn.redhat.com/errata/RHBA-2011-1642.html