Bug 844945

Summary: ovirt-engine-backend [Quota]: cannot remove a quota while there are vm's with wrong error message [TEXT]
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: ofri <omasad>
Status: CLOSED CURRENTRELEASE QA Contact: Dafna Ron <dron>
Severity: medium Docs Contact:
Priority: high    
Version: 3.1.0CC: dfediuck, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: sla
Fixed In Version: si14 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:
Attachments:
Description Flags
log none

Description Dafna Ron 2012-08-01 10:29:45 UTC
Created attachment 601703 [details]
log

Description of problem:

I created a quota with a vm underthe quota. I could not delete the quota with the Quota is not valid error message: 

2012-08-01 13:17:33,487 WARN  [org.ovirt.engine.core.bll.RemoveQuotaCommand] (pool-4-thread-47) CanDoAction of action RemoveQuota failed. Reasons:VAR__ACTION__REMOVE,VAR__TYPE__QUOTA,ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID

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

si12

How reproducible:

100%

Steps to Reproduce:
1. create a quota and create a vm using the quota
2. create a second quota (since we currently cannot remove last quota in single action)
3. select both quota's and remove 
4. remove the vm -> repeat test
  
Actual results:

only the new quota is removed. the quota with the vm using it is not removed and gives "Quota is not valid" error. 

once we remove the vm we are able to remove the quota

Expected results:

if this behaviour is by design we should change the error message

Additional info: full log

Comment 1 Itamar Heim 2012-08-02 07:45:08 UTC
"Cannot remvoe Quota X as it is associated with resources"

(since this is when user is standing on a quota, and can see associated resources in a subtab, i wouldn't bother with listing them in the error message)

Comment 2 ofri 2012-08-07 05:24:06 UTC
Fixed as part of #844652

Comment 3 Dafna Ron 2012-08-16 13:27:53 UTC
verified on si14