Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1206890

Summary: Enforced quota is not applied on existing disks.
Product: [oVirt] ovirt-engine Reporter: Amit Aviram <aaviram>
Component: Frontend.WebAdminAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: unspecified    
Version: ---CC: akrejcir, amureini, bugs, dfediuck, istein, lsurette, mavital, mgoldboi, rbalakri, rgolan, sbonazzo, srevivo, tnisan, ykaul
Target Milestone: ovirt-4.2.0Keywords: TestOnly
Target Release: ---Flags: rule-engine: ovirt-4.2+
mgoldboi: planning_ack+
dfediuck: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:28:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1297210    
Bug Blocks: 1211555    

Description Amit Aviram 2015-03-29 10:51:37 UTC
Description of problem:
While applying a quota for a DC, applying it to a storage domain within the DC- and making the DC to hard enforce quota- all the disks within the storage domain are illegal objects since no quota is applied to any of them.

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

How reproducible:
100%

Steps to Reproduce:

1. Add a quota for the DC, assign it to a storage domain WITH RESIDING DISK/S, and enforce it in the DC.

Actual results:
non of the disks have a related quota until the user chooses to edit them.

also, some of the disks cannot be edited since they are initially bigger sized than all the quota options, thus none of the quotas can be chosen for them.

Expected results:
default quota should be applied to all the related elements. if there are disks which are bigger than the default quota, the "enforce" dc option should be disabled, or the quota cannot be added..

Additional info:

Comment 1 Allon Mureinik 2015-06-30 12:34:56 UTC
Roy - any ETA on this?

Comment 2 Roy Golan 2015-07-15 06:58:59 UTC
that should make it into the beta.

Comment 3 Tal Nisan 2015-08-19 12:42:47 UTC
Any progress there?

Comment 4 Dudi Maroshi 2015-08-19 12:54:58 UTC
Understand the problem.
This is another symptom for lacking clear 'quota enabeling' policy.

We need clear policy for the following:
1. When enabling quota, what to do with existing VM-disk(s) (GUI/REST).
2. After enabling quota, how to mandate the user to select a quota on new disk (GUI/REST).
3. Enabling quota and configuring some disks, disabling quota, enabling again. What is the current quota configuration?

Comment 5 Red Hat Bugzilla Rules Engine 2015-10-19 10:51:35 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 6 Sandro Bonazzola 2015-10-26 12:41:22 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 7 Red Hat Bugzilla Rules Engine 2015-11-01 12:55:35 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 8 Sandro Bonazzola 2015-11-05 08:14:16 UTC
oVirt 3.6.0 has been released on November 4th, re-targeting to 3.6.1 since this bug has been marked as high severity

Comment 9 Eyal Edri 2015-12-17 13:51:27 UTC
ovirt 3.6.1 is GA.
moving all open bugs to 3.6.2

Comment 10 Eyal Edri 2015-12-17 13:59:48 UTC
ovirt 3.6.1 was GA'd, all open bugs should move to 3.6.2.

Comment 11 Allon Mureinik 2016-01-27 05:36:38 UTC
Any update?

Comment 12 Allon Mureinik 2016-03-28 14:47:57 UTC
(In reply to Allon Mureinik from comment #11)
> Any update?
?

Comment 13 Roy Golan 2016-04-03 15:18:13 UTC
We don't have a default quota and I am not sure I want to introduce it now. At any case this is the warning that you get when to enforce you're quota:

"
Moving Quota to Enforce Mode
All the templates, virtual machines, and disks must be assigned into specific quota allocations otherwise will be unusable.
Users should be added as quota consumers.

Please consider using Audit mode until you define Quotas for the users.

Are you sure you want to continue?
"

Amit, the audit mode (similar to selinux permissive) is there to help you design the quota to fit the datacenter prior to enforcing and that's the stage were you should tweak it to you're needs. If you went straight from none to enforce, then obviously this takes you by surprise. Can you retry the whole process this time using the audit mode along the way?

Comment 14 Amit Aviram 2016-04-03 16:57:24 UTC
Rgo- The message you are mentioning is prompted when the user makes the DC to enforce and no quota exists at all.

If there is any quota, no message is shown, and no quota is assigned to any disks in the storage domain. also in audit mode there is no message that warns the user about it..

I am not necessarily suggesting to automatically add a default quota to every disk in the domain, but SOMETHING needs to happen here.. it can be a warning message or whatever, but just putting the DC in "enforce" mode when it does not actually enforce, or in "audit" mode when it doesn't alert anything about the existing disks shouldn't happen..

Does that makes sense to you?

Comment 15 Amit Aviram 2016-04-06 11:15:16 UTC
Just to clear the problem here, if the quota doesn't count the existing disks when setting it to enforce, then the storage usage can exceed the quota enforced upon it.

For example, I have a 100GB domain, and a disk with 10GB on it. now I am setting a quota of 5GB on this domain and make the DC to enforce quota.

This will work, when actually from the start the storage exceeded the quota..

Comment 16 Andrej Krejcir 2017-11-13 11:57:08 UTC
In 4.1, we added the default unlimited quota (in Bug 1297210) and it is used for all disks and VMs that don't have another quota assigned. 
As a side effect, this bug should be fixed now.

Comment 17 Artyom 2017-11-19 15:49:15 UTC
Verified on Verified on ovirt-engine-4.2.0-0.0.master.20171116212005.git61ffb5f.el7.centos.noarch

Comment 18 Sandro Bonazzola 2017-12-20 11:28:08 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.