Bug 1297210 - [quota] Quota field is mandatory for disk creation for storage domain that doesn't have quota rule while quota is configured for specific domains in the DC
[quota] Quota field is mandatory for disk creation for storage domain that do...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
3.6.2
x86_64 Unspecified
high Severity high (vote)
: ovirt-4.1.0-alpha
: 4.1.0
Assigned To: Andrej Krejcir
Shira Maximov
:
Depends On:
Blocks: 1206890
  Show dependency treegraph
 
Reported: 2016-01-10 10:45 EST by Elad
Modified: 2017-11-13 06:57 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: It is possible to specify quotas only for certain storage domain and the other domains will have no quota. Consequence: When quota mode is 'Enforcing', disks cannot be created in storage domains without quota. Fix: Add a default unlimited quota for each data center. Result: Every storage domain in the data center has at least the default quota and disks can be created.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-01 09:55:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1+
mgoldboi: planning_ack+
rgolan: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
engine.log (858.09 KB, application/x-gzip)
2016-01-10 10:45 EST, Elad
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 59634 master MERGED core: add default quota to the DB 2016-08-02 10:26 EDT
oVirt gerrit 59635 master MERGED core: Prevent changing default quota 2016-08-17 03:50 EDT
oVirt gerrit 59830 master MERGED core: Make vm and disk commands use default quota 2016-08-24 09:55 EDT

  None (edit)
Description Elad 2016-01-10 10:45:47 EST
Created attachment 1113333 [details]
engine.log

Description of problem:
While having a quota configured for specific storage domains in the DC, disk creation on other domain in the same DC, that doesn't have quota configured, cannot be performed since the quota field is mandatory for it. Reproduced over REST and Webadmin.  

Version-Release number of selected component (if applicable):
rhevm-3.6.2-0.1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. On a DC with more than 1 storage domains (storage type doesn't matter).
2. Create a quota on the DC for a specific storage domain. Enable the quota for the DC by configure it to enforcing.
3. Initiate disk creation on the storage domain that doesn't have quota configured. Don't specify quota for the the add disk call. For example:

<disk>
<interface>virtio</interface>
<format>raw</format>
<provisioned_size>10737418240</provisioned_size>
<alias>rest</alias>
<storage_domains><storage_domain><name>data1</name></storage_domain></storage_domains>
</disk>


Actual results:
Disk creation is blocked, engine informs that the creation call should be passed with quota:

<fault>
<reason>Operation Failed</reason>
<detail>
[Cannot add Virtual Machine Disk. Quota is not valid.]
</detail>
</fault>

This domain doesn't have quota configured, the quota is configured for another domain in the DC:


#select quota_id,storage_name from quota_storage_view;


               quota_id               | storage_name 
--------------------------------------+--------------
 361089b7-f310-412b-84aa-5ab53d6778bb | data2
 361089b7-f310-412b-84aa-5ab53d6778bb | data3
(2 rows)

Domain 'data1' doesn't have a quota.
Disk creation is not allowed on that domain.

Expected results:
For storage domains in a DC, where quota is configured for specific storage domains, which doesn't have quota configured, quota should not be required when creation a disk on them.

Additional info:
engine.log


2016-01-10 15:35:14,047 WARN  [org.ovirt.engine.core.bll.AddDiskCommand] (ajp-/127.0.0.1:8702-5) [51eddfe8] CanDoAction of action 'AddDisk' failed for user admin@internal. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM_DISK,ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID,$VmName null
Comment 1 Allon Mureinik 2016-01-11 09:03:51 EST
Roy, this is a quota issue, not an add-disk issue. Can someone from your team please take a look?
Comment 5 Roy Golan 2016-02-23 05:36:41 EST
Moran, we don't have a 'default' quota behavior. What do you want to happen here?
Comment 6 Roy Golan 2016-03-02 10:32:52 EST
ignore comment 5. This is a real blocker.
Comment 7 Andrej Krejcir 2016-03-16 11:04:24 EDT
Should we allow creating disks without quota? Similarly to creating disk profiles without QoS.
Comment 8 Moran Goldboim 2016-04-04 05:27:36 EDT
(In reply to Andrej Krejcir from comment #7)
> Should we allow creating disks without quota? Similarly to creating disk
> profiles without QoS.

I think behaviour should stay the same. since if a user selected enforcing quota on a DC, all entities under it should include it.
Comment 9 Roy Golan 2016-05-08 03:42:08 EDT
Lets treat null or non existing quota as unlimited. This is I think the least surprising effect of not configuring quota on domain.
Comment 10 Red Hat Bugzilla Rules Engine 2016-05-17 04:59:03 EDT
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
Comment 11 Sandro Bonazzola 2016-12-12 08:59:18 EST
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
Comment 12 Shira Maximov 2016-12-20 04:22:03 EST
verified on :
oVirt Engine Version: 4.2.0-0.0.master.20161219225535.git893d571.el7.centos

Verification steps:
Steps to Reproduce:
1. On a DC with more than 1 storage domains (storage type doesn't matter).
2. Create a quota on the DC for a specific storage domain. Enable the quota for the DC by configure it to enforcing.
3. Initiate disk creation on the storage domain that doesn't have quota configured. Don't specify quota for the the add disk call. For example:

<disk>
<interface>virtio</interface>
<format>raw</format>
<provisioned_size>10737418240</provisioned_size>
<alias>rest</alias>
<storage_domains><storage_domain><name>data1</name></storage_domain></storage_domains>
</disk>

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