Bug 1003839 - Not possible to remove vm or re-assign quota of vm disk, when vm had assigned quota which no longer exists.
Summary: Not possible to remove vm or re-assign quota of vm disk, when vm had assigned...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.3.0
Assignee: Gilad Chaplik
QA Contact: Lukas Svaty
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-03 10:35 UTC by Ondra Machacek
Modified: 2016-02-10 20:14 UTC (History)
8 users (show)

Fixed In Version: is17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-21 22:18:22 UTC
oVirt Team: SLA
Target Upstream Version:


Attachments (Terms of Use)
engine.log (17.02 KB, text/plain)
2013-09-03 10:35 UTC, Ondra Machacek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19446 0 None None None Never
oVirt gerrit 19652 0 None None None Never
oVirt gerrit 19696 0 None None None Never
oVirt gerrit 19699 0 None None None Never

Description Ondra Machacek 2013-09-03 10:35:43 UTC
Created attachment 793111 [details]
engine.log

Description of problem:
Not possible to remove vm or reassing quota of vm disk, when vm had assigned 
quota which no longer exists. When dc in enforing mode. When DC is switched to 
audit, then reassing of disk quota or removing of vm works OK.

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

How reproducible:
always

Steps to Reproduce:
1. Set DC to enforced mode.
2. Create quota_1 and quota_2.
3. Create vm with disk, assign both quota_1.
4. Set DC to disabled mode.
5. Remove quota_1.
6. Set DC to enforced mode.
7. Try to remove vm, or try to assign different quota to vm disk.

Actual results:
When Removing vm:

Error while executing action:
Cannot remove VM. The quota associated with VM my_vm is no longer available. This may be a result of an import or snapshot restoring actions. Please 
reassign a quota to this VM.

When assigning different quota for vm disk:

Error while executing action: Cannot assign Quota. The quota associated with VM
null is no longer available. This may be a result of an import or snapshot 
restoring actions. Please reassign a quota to this VM.


Expected results:
Both actions should be executed successufully.

Additional info:

Comment 1 Itamar Heim 2013-09-03 21:52:04 UTC
how can we have a VM with a deleted quota?

Comment 2 Doron Fediuck 2013-09-16 13:48:42 UTC
Ondra,
Is this a fresh install or an upgrade?
Also, was this the last quota allocation?

Comment 3 Ondra Machacek 2013-09-18 13:40:57 UTC
Reproduced on fresh is15.
last quota allocation? Quota was assigned to vm, and in disabled mode was removed.
Thus in db vm stay attached to this quota.

before deletion of quota:
engine=# select quota_id from vm_static where vm_guid = '6fc1253b-2ea5-4c20-af40-be81bd055e16';
               quota_id               
--------------------------------------
 3556ef35-b391-404b-904b-293afe857900
(1 row)


after deletion of quota:
engine=# select quota_id from vm_static where vm_guid = '6fc1253b-2ea5-4c20-af40-be81bd055e16';
               quota_id               
--------------------------------------
 3556ef35-b391-404b-904b-293afe857900
(1 row)


Quota stay assinged to vm. So when removing quota which is assinged to some
vms/disks in disabled mode, also quota_id of vms & disk should be changed to 
00000000-0000-0000-0000-000000000000

Comment 4 Lukas Svaty 2013-10-01 08:51:03 UTC
tested on is17

Comment 5 Itamar Heim 2014-01-21 22:18:22 UTC
Closing - RHEV 3.3 Released

Comment 6 Itamar Heim 2014-01-21 22:24:43 UTC
Closing - RHEV 3.3 Released


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