Description of problem: Default source for consolidate Quota is Tenant. Old behavior still supported by changing quota source to user or group. User/group quota limit values come from the quota instance and can be overridden by quota tag values. Units of measure differ between the tag and instance values. Version-Release number of selected component (if applicable): Steps to Reproduce: 1. Modify the /System/CommonMethods/QuotaMethods/quota_source method, changing the quota_source to group. uncomment out these lines. # $evm.root['quota_source'] = @miq_request.requester.current_group # $evm.root['quota_source_type'] = 'group' comment out these lines. $evm.root['quota_source'] = @miq_request.tenant $evm.root['quota_source_type'] = 'tenant' 2. Provision a vm and check quota values. 3. Tag group with memory and storage quota tags. 4. Provision a vm and check quota values to see if they differ from those values from step 2.
https://github.com/ManageIQ/manageiq/pull/7933
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/094fbcd09c1c66cfb74a3effd81e4f2d4a5b9f4c commit 094fbcd09c1c66cfb74a3effd81e4f2d4a5b9f4c Author: william fitzgerald <wfitzger> AuthorDate: Wed Apr 13 13:29:25 2016 -0400 Commit: william fitzgerald <wfitzger> CommitDate: Tue May 10 09:56:28 2016 -0400 Automate - Fixed differences between tenant, group and tag values. Fixed validate quota issue where request was not denied properly when max and warn exceeded. https://bugzilla.redhat.com/show_bug.cgi?id=1319292 3 minor changes Added different calculations for amazon, openstack and google. .../QuotaMethods.class/__methods__/limits.rb | 11 ++++++- .../QuotaMethods.class/__methods__/requested.rb | 6 +++- .../__methods__/validate_quota.rb | 35 ++++++++++------------ .../method_validation/calculate_limits_spec.rb | 4 +-- .../method_validation/calculate_requested_spec.rb | 2 +- .../unit/method_validation/validate_quota_spec.rb | 8 ++--- 6 files changed, 37 insertions(+), 29 deletions(-)
https://github.com/ManageIQ/manageiq/pull/7950
https://github.com/ManageIQ/manageiq/pull/8407
https://github.com/ManageIQ/manageiq/pull/8473
Checked in 5.6.0.9, the units seem to fit together: Tenant source: <AEMethod validate_quota> Request: Provision from [autoImageImport-DoNotDelete] to [test_mfalesni_quotas1] id: 3 <AEMethod validate_quota> quota_warning: {:cpu=>0, :memory=>0, :storage=>0, :vms=>0} <AEMethod validate_quota> quota_limits: {:cpu=>128, :memory=>549755813888, :storage=>2147483648000} <AEMethod validate_quota> Item: storage Used: (12427460876288) Requested: (11274291200) Max: (2147483648000) Warn: (0) <AEMethod validate_quota> Quota storage exceeded: Used(11.3 TB) + Requested(10.5 GB) > Quota(1.95 TB) <AEMethod validate_quota> Quota maximum exceeded for key: storage_quota_exceeded reason: storage - Used: 11.3 TB plus requested: 10.5 GB exceeds quota: 1.95 TB <AEMethod validate_quota> Item: vms Used: (154) Requested: (1) Max: (0) Warn: (0) <AEMethod validate_quota> Item: cpu Used: (363) Requested: (1) Max: (128) Warn: (0) <AEMethod validate_quota> Quota cpu exceeded: Used(363) + Requested(1) > Quota(128) <AEMethod validate_quota> Quota maximum exceeded for key: cpu_quota_exceeded reason: cpu - Used: 363 plus requested: 1 exceeds quota: 128 <AEMethod validate_quota> Item: memory Used: (826378551296) Requested: (1073741824) Max: (549755813888) Warn: (0) <AEMethod validate_quota> Quota memory exceeded: Used(770 GB) + Requested(1 GB) > Quota(512 GB) <AEMethod validate_quota> Quota maximum exceeded for key: memory_quota_exceeded reason: memory - Used: 770 GB plus requested: 1 GB exceeds quota: 512 GB The numbers correspond to what I have inserted in the tenant quotas. Group source (added tags on the group): <AEMethod validate_quota> Request: Provision from [autoImageImport-DoNotDelete] to [test_mfalesni_quotas2] id: 6 <AEMethod validate_quota> quota_warning: {:storage=>1073741824, :vms=>10, :cpu=>2, :memory=>1073741824} <AEMethod validate_quota> quota_limits: {:storage=>107374182400, :vms=>20, :cpu=>1, :memory=>1073741824} <AEMethod validate_quota> Item: storage Used: (10737420288) Requested: (11274291200) Max: (107374182400) Warn: (1073741824) <AEMethod validate_quota> Quota storage warning: Used(10 GB) + Requested(10.5 GB) > Quota(1 GB) <AEMethod validate_quota> Quota warning for key: storage_quota_warn_exceeded reason: storage - Used: 10 GB plus requested: 10.5 GB exceeds quota: 1 GB <AEMethod validate_quota> Item: vms Used: (1) Requested: (1) Max: (20) Warn: (10) <AEMethod validate_quota> Item: cpu Used: (1) Requested: (2) Max: (1) Warn: (2) <AEMethod validate_quota> Quota cpu exceeded: Used(1) + Requested(2) > Quota(1) <AEMethod validate_quota> Quota maximum exceeded for key: cpu_quota_exceeded reason: cpu - Used: 1 plus requested: 2 exceeds quota: 1 <AEMethod validate_quota> Item: memory Used: (1073741824) Requested: (2147483648) Max: (1073741824) Warn: (1073741824) <AEMethod validate_quota> Quota memory exceeded: Used(1 GB) + Requested(2 GB) > Quota(1 GB) <AEMethod validate_quota> Quota maximum exceeded for key: memory_quota_exceeded reason: memory - Used: 1 GB plus requested: 2 GB exceeds quota: 1 GB Again values correspond with what I tagged the group with.
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=bc8393d1ac605e0355ec7e1d62bb0833e081ff18 commit bc8393d1ac605e0355ec7e1d62bb0833e081ff18 Author: william fitzgerald <wfitzger> AuthorDate: Wed Apr 13 13:29:25 2016 -0400 Commit: william fitzgerald <wfitzger> CommitDate: Wed Jun 22 16:26:09 2016 -0400 Automate - Fixed differences between tenant, group and tag values. Fixed validate quota issue where request was not denied properly when max and warn exceeded. https://bugzilla.redhat.com/show_bug.cgi?id=1319292 3 minor changes Added different calculations for amazon, openstack and google. .../QuotaMethods.class/__methods__/limits.rb | 11 ++++++- .../QuotaMethods.class/__methods__/requested.rb | 12 +++++++- .../__methods__/validate_quota.rb | 35 ++++++++++------------ .../method_validation/calculate_limits_spec.rb | 4 +-- .../unit/method_validation/validate_quota_spec.rb | 8 ++--- 5 files changed, 42 insertions(+), 28 deletions(-)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1348