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
Summary: [quota] Quota field is mandatory for disk creation for storage domain that do...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 3.6.2
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ovirt-4.1.0-alpha
: 4.1.0
Assignee: Andrej Krejcir
QA Contact: Shira Maximov
URL:
Whiteboard:
Depends On:
Blocks: 1206890
TreeView+ depends on / blocked
 
Reported: 2016-01-10 15:45 UTC by Elad
Modified: 2017-11-13 11:57 UTC (History)
9 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-02-01 14:55:10 UTC
oVirt Team: SLA
Embargoed:
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 15:45 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 59634 0 master MERGED core: add default quota to the DB 2020-10-01 09:15:39 UTC
oVirt gerrit 59635 0 master MERGED core: Prevent changing default quota 2020-10-01 09:15:32 UTC
oVirt gerrit 59830 0 master MERGED core: Make vm and disk commands use default quota 2020-10-01 09:15:32 UTC

Description Elad 2016-01-10 15:45:47 UTC
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 14:03:51 UTC
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 10:36:41 UTC
Moran, we don't have a 'default' quota behavior. What do you want to happen here?

Comment 6 Roy Golan 2016-03-02 15:32:52 UTC
ignore comment 5. This is a real blocker.

Comment 7 Andrej Krejcir 2016-03-16 15:04:24 UTC
Should we allow creating disks without quota? Similarly to creating disk profiles without QoS.

Comment 8 Moran Goldboim 2016-04-04 09:27:36 UTC
(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 07:42:08 UTC
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 08:59:03 UTC
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 13:59:18 UTC
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 09:22:03 UTC
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.