Bug 1130163 - FreeSpaceCriticalLowInGB variable causes unclear behavior when running a vm with disks on insufficient space domain
Summary: FreeSpaceCriticalLowInGB variable causes unclear behavior when running a vm w...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Shahar Havivi
QA Contact: Israel Pinto
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-14 13:11 UTC by Ori Gofen
Modified: 2016-05-26 01:52 UTC (History)
9 users (show)

Fixed In Version: 3.6.0-12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-22 13:28:44 UTC
oVirt Team: Virt
rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 45765 master MERGED engine: no need to calculate readonly and preallocated disk size on running vm Never
oVirt gerrit 45769 ovirt-engine-3.6 MERGED engine: no need to calculate readonly and preallocated disk size on running vm Never
oVirt gerrit 45771 master MERGED engine: no need to calculate readonly and preallocated disk size on running vm from suspend Never
oVirt gerrit 45777 ovirt-engine-3.6 MERGED engine: no need to calculate readonly and preallocated disk size on running vm from suspend Never

Description Ori Gofen 2014-08-14 13:11:35 UTC
Description of problem:

FreeSpaceCriticalLowInGB variable blocks with CDA the attempt to run a vm on a domain with insufficient space,popup error window explains:
"Error while executing action:

vm_state:

    Cannot run VM. Low disk space on Storage Domain iscsi."

but the only case I could think of that make sense to block this operation is when having at least { a thin provision disk on the domain && the read_only flag on the disk is not marked }

there is no reason to block a vm run with CDA when having preallocated disks or read only disks on the domain.

Version-Release number of selected component (if applicable):
rc1

How reproducible:
100%

Steps to Reproduce:
1.run engine-config -g FreeSpaceCriticalLowInGB (make sure it is set to 5G)
2.run vm+with disk on the domain(preallocated or read only or both)
3.fill the domain so it has less than 5G
4.power off the vm
5.run the vm

Actual results:
engine CDA block

Expected results:
shouldn't block unless the disk is thin provisioned

Additional info:

Comment 1 Allon Mureinik 2014-08-14 17:38:36 UTC
From examining the code this seems as though it should only happen if you're running the VM stateless.
Ori - Are you sure you aren't running as stateless by mistake?

Comment 2 Ori Gofen 2014-08-17 07:13:07 UTC
Yes

Comment 3 Allon Mureinik 2014-08-25 12:28:32 UTC
Did some digging - org.ovirt.engine.core.bll.validator.RunVmValidator#validateStorageDomains calls StorageDomainValidator#allDomainsWithinThresholds() - not quite sure why its needed and what the benefit it.

Defering to virt to check if this was intentional or not, and acts accordingly.

Comment 4 Arik 2014-08-25 13:09:21 UTC
(In reply to Allon Mureinik from comment #3)
It doesn't look right, we should check only for:
1. stateless/vm in pool: need to check every storage domain which contains disk that we're about to take snapshot for
2. each storage domain that contains disk which is not pre-allocated and not read-only

Comment 5 Israel Pinto 2015-12-07 14:46:04 UTC
Verify with:
RHEVM version: 3.6.1.1-0.1.el6
vdsm: 3.6.1.1-0.1.el6
libvirt: 3.6.1.1-0.1.el6

Steps to reproduce:
1. check that Critical Space Action Blocker size is 5G
2. Fill storage domain, free space: ~3G
3. Test cases 
Case 1: Create VM with preallocated disk with size 20G.
        Expected: Can Do Action: can't add disk low disk space
Case 2: Create VM with thin provision disk with size 20G, run VM: 
        Expected: Can Do Action: can't run vm low  disk space
Case 3: Create VM with read only disk with size 20G, run VM: 
        Expected: VM should run
Case 4: Update disk allocation policy from Read only to thin provision. 
        Expected: Can Do Action: can't run vm low  disk space 

Results:
Case1: Per allocate disk: Error massage:
Cannot add Virtual Machine Disk. Low disk space on Storage Domain <>.
Case2: Thin provision:Error massage:
Cannot run VM. Low disk space on Storage Domain <>. 
Case3: Read Only: VM  runing
Case2: Update to Thin provision:Error massage:
Cannot run VM. Low disk space on Storage Domain <>. 

All cases PASS

Comment 6 Sandro Bonazzola 2015-12-22 13:28:44 UTC
oVirt 3.6.0 has been released and the bz verified, moving to closed current release.


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