Bug 1021789 - No error shows when the allocation of new lvm volume set as 0
No error shows when the allocation of new lvm volume set as 0
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Giuseppe Scrivano
Virtualization Bugs
Depends On: 1000980
  Show dependency treegraph
Reported: 2013-10-22 02:18 EDT by hyao@redhat.com
Modified: 2014-06-17 20:00 EDT (History)
8 users (show)

See Also:
Fixed In Version: virt-manager-0.10.0-7.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1000980
Last Closed: 2014-06-13 05:47:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description hyao@redhat.com 2013-10-22 02:18:38 EDT
Clone the bug since reproduced the bug with the packages below: 
# rpm -qa libvirt virt-manager

Create a new volume in a lvm pool and set the allocation to 0 or "we". 
No error message pops up. 

Set the allocation as "we" when creating new volume in other types of pool, no error message shows. 

+++ This bug was initially created as a clone of Bug #1000980 +++

No error shows when the allocation of new lvm volume set as 0


How reproducible:

Steps to Reproduce:
1. Create a lvm pool.
2. In the lvm pool,create a new volume.Click "New Volume",set name,set "Max Capacity" as 1000 MB,
   set "Allocation" as a number which is smaller than 1000,eg:10.
3. Click "Finish",error shows:"Sparse logical volumes are not supported, allocation must be equal to capacity".
4. On step 2,if set "Allocation" as 0 or random value eg:"sdll",no error shows.

Actual results:
As description.

Expected results:
Error shows in step 4 as step 3.

Additional info:
If set random value eg "sdll" for volume allocation on other types of pool,no error shows.

--- Additional comment from RHEL Product and Program Management on 2013-08-26 05:13:29 EDT ---

Since this bug report was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Martin Kletzander on 2013-08-28 11:15:20 EDT ---

Allocation 0 means that there is no setting for allocation.  This might be confusing for users, but we need to keep the default value working.  Can we change the default allocation to the same number as capacity in case of logical pool?  Maybe make the widget disabled to disallow changing it.  In any case, there should be also a check for whether the value is a number.

--- Additional comment from Dave Allan on 2013-09-06 10:24:12 EDT ---

Moving to 6.6 for capacity reasons.

--- Additional comment from hyao@redhat.com on 2013-10-22 02:03:47 EDT ---

Reproduced the bug with the following packages: 

# rpm -qa libvirt virt-manager

Create a new volume in the LVM pool
Set "Allocation" as 0 or random value eg:"sdll",no error shows.
Set random value eg "sdll" for volume allocation on other types of pool,no error shows.
Comment 2 Giuseppe Scrivano 2013-10-31 09:40:51 EDT
are you sure this bug is still valid for RHEL-7?  Or are you referring only the the sanity checks for the user provided input?

There shouldn't be any error shown to the user, since the "Sparse logical volumes are not supported setting allocation equal to capacity" message was degraded to a warning that you can see when you run virt-manager --debug.
Comment 3 hyao@redhat.com 2013-10-31 23:30:04 EDT
Hi Giuseppe, 

You're right there should be an error message in debug info. But currently, we lost it in the debug info and there's no error notification shown to the user about it. This seems weird and unreasonable if neither of them are used. 

I've test with the latest packages: 
# rpm -qa libvirt qemu-kvm virt-manager

Launch virt-manager by #virt-manager --dubug. 
Create a volum in the lvm pool by virt-manager GUI. and set the allocation as 0 or we. 
Check the debug info: 

2013-11-01 11:17:22,980 (host:777): Launching 'Add Volume' wizard for pool 'lvm'
2013-11-01 11:17:22,981 (createvol:81): Showing new volume wizard
2013-11-01 11:17:48,809 (createvol:229): Creating volume with xml:

2013-11-01 11:17:48,811 (asyncjob:190): Creating async job for function cb=<bound method vmmCreateVolume._async_vol_create of <vmmCreateVolume object at 0x7f4f580de5a0 (virtManager+createvol+vmmCreateVolume at 0x7f4f5811cae0)>>
2013-11-01 11:17:48,892 (createvol:260): Starting backround vol creation.
2013-11-01 11:17:48,893 (Storage:1220): Creating storage volume 'test' with xml:

2013-11-01 11:17:49,788 (Storage:1243): Storage volume 'test' install complete.
2013-11-01 11:17:49,788 (createvol:262): vol creation complete.
2013-11-01 11:17:49,933 (createvol:87): Closing new volume wizard

There should be a dubug info after the "Showing new volume wizard", but now there's not. 

Check the volum info by: 
 virsh vol-info /dev/lvm/test 
Name:           test
Type:           block
Capacity:       200.00 MiB
Allocation:     200.00 MiB

So I think this bug is still valid on rhel7.
Comment 6 hyao@redhat.com 2013-11-11 06:19:25 EST
Verified with virt-manager-0.10.0-7.el7
Set the allocation of the volumn in a lvm pool as random character or the allocation is not equal to the max capacity,  "Sparse logical volumes are not supported, setting allocation equal to capacity" is displayed in the debug info.
Comment 8 Ludek Smid 2014-06-13 05:47:02 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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