Red Hat Bugzilla – Bug 845069
ovirt-enegine-backend [Quota]: moving a DC to quota mode enforcing should be blocked if quota assignments are missing.
Last modified: 2016-02-10 15:16:05 EST
Created attachment 601777 [details]
Description of problem:
I created a disk on one domain before quota was enforced.
after I enforced a quota I created a quota on a different domain in the DC and created a vm
I was able to attach the disk (which has no quota) to the vm (which has a quota defined).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create 2 storage domains under a single DC
2. create a floating disk under one domain
3. create a quota under the second domain and enforce the quota
4. attach the floating disk to the vm
we are able to attach the floating disk which has no quota defined
we should not be able to attach the disk
Additional info: engine log
I'm not even sure this is a bug.
I see no difference in having a disk with empty quota before or after it is attached to a VM.
disk quota and vm quota are not the same thing (although vm quota should be the default quota for its disks).
this would also be solved yb not allowing to have null quotas when moving a storage domain to enforcing.
Documenting existing search queries for Quota;
Vms: quota = null
Templates : quota = null
Disks: quota = null
The above can be used of course to locate other named quota assignments,
Vms: quota = students-quota
Templates : quota = production-quota
Disks: quota != null
The queries in comment 6 should be used in order to help the admin to find
all relevant entities with missing quota assignments. Once these are found
they can be assigned and only then the DC quota may move to enforce.
As a part of fixing Bug 845022, we've added a confirmation dialog with all the relevant information. So when the admin moves a DC to quota enabled (enforcing or audit) and there are no quota assignments this dialog will provide the needed feedback.
Closing this BZ per the 845022 fix.