Bug 1517492 - Create VM with new created quota fails.
Summary: Create VM with new created quota fails.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.2.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ovirt-4.2.1
: ---
Assignee: Andrej Krejcir
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-26 07:16 UTC by Polina
Modified: 2018-02-12 11:56 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-02-12 11:56:07 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)
engine.log attached (111.56 KB, text/plain)
2017-11-26 12:51 UTC, Polina
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85150 0 master MERGED core: Adding quota with no cluster or storage quota uses default 2018-01-03 10:02:58 UTC

Description Polina 2017-11-26 07:16:11 UTC
Description of problem: 
Create new quota with name , get 201. then try to create VM with this quota - bad request 400. it is regression from 4.1.

Version-Release number of selected component (if applicable):
rhvm-4.2.0-0.5.master.el7.noarch

How reproducible:100%

Steps to Reproduce:
1. Create minimal quota, like 
 Content-Type: application/xml

 POST https://compute-ge-3.scl.lab.tlv.redhat.com/ovirt-
 engine/api/datacenters/bb4bff86-9243-4fc2-b57e-fdc29a93b176/quotas

 <quota>
   <name>q1</name>
 </quota>

2. Create new vm with this quota 
   
Actual results: in webUI the quota even not in the quota list (Edit VM/Genera/quota).
Trying to send by Rest API returns error 400

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


Expected results: it is regression from 4.1


Additional info:

Comment 1 Polina 2017-11-26 07:18:18 UTC
Expected results: it is regression from 4.1. So, expected - the VM is created successfully.

Comment 2 Yaniv Kaul 2017-11-26 10:30:52 UTC
1. Please rephrase the title.
2. Please provide all relevant logs.
3. As the error says - please check the quota is valid.

Comment 3 Polina 2017-11-26 12:29:37 UTC
1.

Comment 4 Polina 2017-11-26 12:51:52 UTC
Created attachment 1359148 [details]
engine.log attached

Comment 5 Polina 2017-11-26 12:56:50 UTC
1. The title is rephrased.
2. engine.log added
3. quota is valid. Created with status 201. and I also checked that the same quota is created in 4.1.

Comment 6 Yaniv Kaul 2017-11-26 13:57:53 UTC
At least according to engine.log, the name of the quota is 'quota_1' and not 'q1':

2017-11-26 14:44:09,168+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-27) [d676b66d-33de-41d0-a4bc-a0b88de77277] EVENT_ID: USER_ADD_QUOTA(3,000), Quota quota_1 has been added by admin@internal-authz.

Comment 7 Polina 2017-11-27 07:24:14 UTC
yes, you are right. to attach the logs I reproduced the scenario anew and put the 
new quota name = 'quota_1'. So, In POST request the same name must be used accordingly :
POST https://compute-ge-3.scl.lab.tlv.redhat.com/ovirt-
 engine/api/datacenters/bb4bff86-9243-4fc2-b57e-fdc29a93b176/quotas

 <quota>
   <name>quota_1</name>
 </quota>

Comment 8 Michal Skrivanek 2017-11-27 09:18:40 UTC
nothing obvious in the logs, just returning ACTION_TYPE_FAILED_QUOTA_NOT_EXIST.
moving to SLA area

Comment 9 Red Hat Bugzilla Rules Engine 2017-12-06 11:36:45 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 10 Polina 2018-01-08 10:04:30 UTC
verified by running regression test rhevmtests/compute/sla/quota/quota_test.py
for rhv-release-4.2.1-1-001.noarch

Comment 11 Sandro Bonazzola 2018-02-12 11:56:07 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

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


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