Bug 1178022

Summary: RHEV: Faulty storage allocation checks when running VM with unplugged disks as stateless
Product: Red Hat Enterprise Virtualization Manager Reporter: Allon Mureinik <amureini>
Component: ovirt-engineAssignee: Vered Volansky <vered>
Status: CLOSED NOTABUG QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acanan, amureini, ecohen, gklein, iheim, lpeer, lsurette, rbalakri, Rhev-m-bugs, scohen, tnisan, vered, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1149809 Environment:
Last Closed: 2015-01-12 12:57:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1149809    
Bug Blocks: 960934, 1054175    
Attachments:
Description Flags
engine vdsm and server logs none

Description Allon Mureinik 2015-01-01 13:44:32 UTC
+++ This bug was initially created as a clone of Bug #1149809 +++

Description of problem:
Looking into the code, this verification was done with all disks, while it should have been done with only plugged disks.

Run a VM as stateless with and without plugged disks, and with and without storage space for new disks.

No plugged disks - CDA should pass - even when there's low storage space.
plugged disks - CDA should fail when there's not enough space for the plugged disks only.

      | File Domain                             | Block Domain
 -----|-----------------------------------------|-------------
 qcow | 1M (header size)                        | 1G
 -----|-----------------------------------------|-------------
 raw  | preallocated: disk capacity (getSize()) | disk capacity
      | thin (sparse): 1M                       | (there is no raw sparse on 
                                                   block domains)
-------------------------------------------------------------------------------
This bug is a RHEV tracker for the QE team to verify against RHEVM 3.5.0

Comment 1 Kevin Alon Goldblatt 2015-01-07 16:09:30 UTC
As per description:

No plugged disks - CDA should pass - even when there's low storage space.
plugged disks - CDA should fail when there's not enough space for the plugged disks only.

Using nfs thin and preallocated disks.
 >>>> The CDA did not pass with unplugged disks and low space. 

Moving to Assigned.

Tested on:

rhevm-3.5.0-0.27.el6ev.noarch
vdsm-4.16.8.1-4.1.el6ev.x86_64


2015-01-07 15:58:16,542 WARN  [org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand] (ajp-/127.0.0.1:8702-12) CanDoAction of action CreateAllSnapshotsFromVm failed. Reasons:VAR__ACTION__CREATE,VAR__TYPE__SNAPSHOT,ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN,$storageName nfs
2015-01-07 16:01:08,698 WARN  [org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand] (ajp-/127.0.0.1:8702-17) CanDoAction of action CreateAllSnapshotsFromVm failed. Reasons:VAR__ACTION__CREATE,VAR__TYPE__SNAPSHOT,ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN,$storageName nfs
[root@kevin-rhevm ~]# Timeout, server not responding.

Comment 2 Kevin Alon Goldblatt 2015-01-07 16:11:12 UTC
Created attachment 977430 [details]
engine vdsm and server logs

Adding logs

Comment 3 Vered Volansky 2015-01-12 12:57:56 UTC
RunVm as stateless validation indeed validate only the plugged disks.
The the commands execute calls CreateAllSnapshotsFromVmCommand, which in turn calls its CDA. In this CDA all the disks, plugged and unplugged, are validated for snapshot-space, as all will later be allocated in the command's execute method.
After further consideration, this is actually the wanted behaviour, since if there are no snapshot for unplugged disks, and any of these disks are later plugged during the stateless running of the VM, data will actually be written to the disk (and not to the snapshot, to be deleted later on).
Closing-not a bug. Will open a new bug to monitor better, non-redundant storage allocation validation in this flow.

Comment 4 Allon Mureinik 2015-01-12 16:14:48 UTC
(In reply to Vered Volansky from comment #3)
> Will open a new bug to monitor better, non-redundant
> storage allocation validation in this flow.

This is bug 1181133, right?

Comment 5 Vered Volansky 2015-01-13 12:30:23 UTC
Opened bz1181133 in order to monitor issue in comment #3.