Bug 502777

Summary: virt-manager does not recalculate free disk space on new VM creation
Product: [Fedora] Fedora Reporter: Stefan Assmann <sassmann>
Component: virt-managerAssignee: Daniel Berrange <berrange>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: berrange, crobinso, hbrock, markmc, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-24 12:11:40 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 498969    

Description Stefan Assmann 2009-05-27 03:46:07 EDT
Description of problem:
Trying to create a new VM when there were on 3B left on /. After deleting some files and having 5GB of space on / virt-manager still thinks there are only 3GB of space left when trying to create a new machine.

Version-Release number of selected component (if applicable):
virt-manager-0.7.0-5.fc11.i586

How reproducible:
always

Steps to Reproduce:
1. create new VM in virt-manager. On step 4 of 5 the remaining space on / is shown.
2. free some space on /, create new VM and verify that the size didn't change in step 4
  
Actual results:
calculated free disk space stays the same

Expected results:
calculated free disk space is re-checked whenever a new VM is created

Additional info:
free space on boot:
sassmann@x60:/> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              20G   16G  2,6G  87% /

free space later on:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              20G   14G  4,6G  76% /
Comment 1 Mark McLoughlin 2009-06-04 11:38:43 EDT
Ah, this is the "XXXGb available on the host" thing

I guess to fix this we'd just need to poll every five seconds or something

Adding to F12VirtTarget
Comment 2 Stefan Assmann 2009-06-05 07:41:01 EDT
Why would we need to poll for the remaining disk space every so often? We could just update the value whenever necessary. Polling should be considered the last of all options because you constantly need to get out of idle state.

I'm not sure if there are any other places where you need the free disk space value. As of now I've only seen it during VM creation.

What's your opinion Mark?

Btw, thanks for considering all my RFEs!
Comment 3 Mark McLoughlin 2009-06-05 08:31:29 EDT
(In reply to comment #2)
> We could just update the value whenever necessary.

Define "whenever necessary"

IMHO, when the label is visible we'll need to poll to keep it up to date
Comment 4 Stefan Assmann 2009-06-12 09:47:21 EDT
By "whenever necessary" I mean whenever a window shows up that interacts with the remaining disk space value. The value is unlikely to significantly change during the creation of a VM but I don't know where else it might be used.

The value could be updated every-time _before_ it is actually read, which would avoid polling.
Comment 5 Cole Robinson 2009-09-24 12:11:40 EDT
Fixed in virt-manager-0.8.0-5. While the 'New VM' wizard is up, we poll every 3 seconds to make sure the value is current. Updating it only at access time doesn't fly, since the value is used to limit the storage size spin box, and has to be deliberately adjusted.