Bug 909749

Summary: [RESTAPI] Possible to create vm without quota when dc is in enforced or audit mode.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engine-restapiAssignee: Gilad Chaplik <gchaplik>
Status: CLOSED CURRENTRELEASE QA Contact: Ondra Machacek <omachace>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, bdagan, dfediuck, dyasny, hateya, iheim, mpastern, oramraz, Rhev-m-bugs, sgrinber, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: sf9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:    
Bug Blocks: 917401    
Attachments:
Description Flags
engine.log none

Description Ondra Machacek 2013-02-10 21:18:08 UTC
Description of problem:


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

How reproducible:
always

Steps to Reproduce:
1. Set DC to enforced mode(or audit).
2. Create vm via API in this dc.
  
Actual results:
Success

Expected results:
Fail - quota is not valid.

Additional info:
2013-02-10 22:16:52,410 INFO  [org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand] (pool-4-thread-50) [423be251] Running command: UpdateStoragePoolCommand internal: false. Entities affected :  ID: e5371bf4-df96-4ce9-81a5-3bf04caa896c Type: StoragePool
2013-02-10 22:17:07,340 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-1) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:07,357 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-1) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:07,358 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-1) calling GetConfigurationValueQuery (VdcVersion) with null version, using default general for version
2013-02-10 22:17:07,840 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-16) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:07,850 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-16) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:08,303 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-7) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:08,315 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-7) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:08,728 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-18) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:08,740 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-18) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:09,371 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-13) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:09,385 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-13) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:09,470 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-13) [b72f692] Lock Acquired to object EngineLock [exclusiveLocks= key: vm2 value: VM_NAME
, sharedLocks= ]
2013-02-10 22:17:09,525 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-13) [b72f692] Running command: AddVmFromScratchCommand internal: false. Entities affected :  ID: cb685e0f-59b9-47e1-b438-d545fc02cf84 Type: VdsGroups
2013-02-10 22:17:09,577 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (ajp-/127.0.0.1:8702-13) [b72f692] Lock freed to object EngineLock [exclusiveLocks= key: vm2 value: VM_NAME
, sharedLocks= ]
2013-02-10 22:17:10,109 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-12) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:10,117 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-12) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:10,799 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-8) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:10,809 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-8) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-02-10 22:17:11,596 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-5) Running command: LoginUserCommand internal: false.
2013-02-10 22:17:11,617 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-5) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version

Comment 1 Haim 2013-02-11 07:39:30 UTC
please attach full engine log (also XML of the test).

Comment 2 Ondra Machacek 2013-02-18 22:00:54 UTC
Created attachment 699165 [details]
engine.log

Query to API is run like this:

curl -k -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -H "Filter: $filter" -d "<vm><name>test_vm</name><cluster><name>cluster</name></cluster><template><name>Blank</name></template></vm>" -u $U https://$url/api/vms/

Comment 3 Itamar Heim 2013-06-11 09:50:30 UTC
3.2 has been released

Comment 4 Itamar Heim 2013-06-11 09:50:37 UTC
3.2 has been released

Comment 5 Itamar Heim 2013-06-11 09:58:15 UTC
3.2 has been released