Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 909864

Summary: [Admin Portal] Unable to delete a quota
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engine-webadmin-portalAssignee: Doron Fediuck <dfediuck>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, dfediuck, dyasny, ecohen, iheim, Rhev-m-bugs, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-13 14:45:02 UTC 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:

Description Jiri Belka 2013-02-11 10:45:01 UTC
Description of problem:
I was unable to delete a quota called 'limit' even in Quota details 'VM', 'Templates' subtabs there is not VM using this quota. But in quota list, i see for 'limit' quota 'Storage Comsumption 90%' -- related to BZ908809?

limit: cf6f0c9d-ba19-4e56-9d6d-15aac59c3426
test:  ec4e34ca-0e86-42a4-a649-6f26d1a65600

$ for i in vms disks ; do curl -sk -X GET -u 'admin@internal:x' -H 'Accept: application/xml' https://10.34.63.76/api/$i ; done | grep quota | sort | uniq
<quota id="00000000-0000-0000-0000-000000000000"/>
<quota id="ec4e34ca-0e86-42a4-a649-6f26d1a65600"/>

While deleting 'limit' quota from Administration Portal.

2013-02-11 11:20:09,940 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (QuartzScheduler_Worker-70) No string for UNASSIGNED type. Use default Log
2013-02-11 11:20:16,397 WARN  [org.ovirt.engine.core.bll.RemoveQuotaCommand] (ajp-/127.0.0.1:8702-5) CanDoAction of action RemoveQuota failed. Reasons:VAR__ACTION__REMOVE,VAR__TYPE__QUOTA,ACTION_TYPE_FAILED_QUOTA_IN_USE_BY_VM_OR_DISK

With current UI it is impossible to even detect where could be problem.

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

How reproducible:
no

Steps to Reproduce:
1.
2.
3.
  
Actual results:
I could not deleted quota, even no VM/disks was using it. I managed to delete it while disabling quota on the DC.

Expected results:
?

Additional info:
I see there's hidden default quota '<quota id="00000000-0000-0000-0000-000000000000"/>', so maybe the trick could be to list this quota as 'Default' with unlimited resources by default. While deleting another quota, all objects could change quota to this 'Default' one, then there would be no untrackable objects using old quota. What is the purpose of keeping old quota internally when the quota is deleted from UI? (I can only think about getting list of objects which used "old/deleted" quota for some "recovery" issue, nevertheless the quota settings were lost anyway.)

If I assign a disk to quota - Storage tab - Add disk, define quota - I cannot see without inspecting api this disk uses any quota. Quota details subpane should contain 'Disks' tab to help with this.

Comment 2 Doron Fediuck 2013-02-13 14:45:02 UTC
This is a dup' of bug 895237, to be released in the coming build.

*** This bug has been marked as a duplicate of bug 895237 ***