Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 453061

Summary: CRM #1831514 - virt-manager/ Remove showing incorrect partition size while adding block devices
Product: Red Hat Enterprise Linux 5 Reporter: ritz <rkhadgar>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: astokes, gozen, tao, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:21:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 449772    
Attachments:
Description Flags
patch - courtesy of Sadique Puthenp
none
Attempt to show correct sizes for block device. none

Description ritz 2008-06-27 00:35:04 UTC
Description of problem:

This was only fixed in src/virtManager/create.py and also need to be fixed in
src/virtManager/addhardware.py to prevent the wrong size of 2000MB being
reported while adding a block device after the guest was installed.

The bugzilla where this was fixed in create.py is
https://bugzilla.redhat.com/show_bug.cgi?id=440245

How reproducible:
Always.

Steps to Reproduce:
In RHEL-5.2, after a guest was installed, please follow the below steps.

- Launch virt-manager.
- Right click on the guest -> Select Details -> Select "Hardware" tab -> Select
"Add" -> Select "Storage device" in the "Hardware type" window and click forward
-> Select "Normal Disk Partition" and a Partition using the "Browse" button ->
Select "Virtual disk" from the "Device type" box and click forward

Actual results:
- On this window the size of the virtual disk would be reported wrongly as 2000MB.

Expected results:
It shouldn't report any size.

Additional info:
patch attached. Courtesy of Sadique Puthenp

Affected version of virt-manager:
virt-manager-0.5.3-8.el5

Comment 1 ritz 2008-06-27 00:35:05 UTC
Created attachment 310404 [details]
patch - courtesy of Sadique Puthenp

Comment 2 Jeremy West 2008-07-14 14:57:29 UTC
IMHO, the above patch changes the wrongly reported size of 2000MB to a "-". 
This is not a good fix.  Having virt-manager display 2000MB is a BUG and it
should be fixed appropriately.

--jwest

Comment 3 Cole Robinson 2008-07-15 15:38:24 UTC
Similar fix is already upstream, so I'll just pull that down:

http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=0443e2c85e97

Comment #2, I'm not sure I follow. The bug here is that we are displaying the
"create-a-disk-of-this-size" value in the summary section, even if a block
device was selected (which virt-manager cannot directly create). Just blanking
out this value with a '-' to indicate 'not-relevant-here' seems like a
reasonable step.

Comment 4 RHEL Program Management 2008-07-15 15:42:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Cole Robinson 2008-09-17 14:21:30 UTC
Created attachment 316965 [details]
Attempt to show correct sizes for block device.

Comment 9 Cole Robinson 2008-09-17 14:24:16 UTC
To test this, in the new VM wizard or Add Hardware wizard, select an existing disk partition to use to install the guest. Move forward to the summary screen, and the size of this partition should be shown. Now back up and enter something like /dev/cdrom as the partition to use (obviously invalid). The summary screen should now show a '-' as the size.

Previously the size listed here would always be whatever was in the 'File Size' spin button in the add hardware wizard, or an unconditional '-' in the create wizard.

Comment 14 errata-xmlrpc 2009-01-20 21:21:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0137.html