Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1342180 - Quota enforcement for user as quota source does not work
Summary: Quota enforcement for user as quota source does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.7.0
Assignee: William Fitzgerald
QA Contact: Milan Falešník
URL:
Whiteboard: quota
Depends On:
Blocks: 1353240
TreeView+ depends on / blocked
 
Reported: 2016-06-02 15:49 UTC by Aziza Karol
Modified: 2017-02-07 14:32 UTC (History)
8 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1353240 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:10:09 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

Description Aziza Karol 2016-06-02 15:49:28 UTC
Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
using the automate explorer:
1) Copy the /System/CommonMethods/QuotaMethods/quota_source method to a writable enabled domain.

quota_source method.
#
# Description: Get quota source.
#

@miq_request = $evm.root['miq_request']
$evm.root['quota_source_type'] = $evm.parent['quota_source_type'] || $evm.object['quota_source_type']

if $evm.root['quota_source_type'].casecmp('group').zero?
  $evm.root['quota_source'] = @miq_request.requester.current_group
else
  $evm.root['quota_source'] = @miq_request.tenant
  $evm.root['quota_source_type'] = 'user'
end

2) Edit the copied quota_source method:
  a.set the quota_source_type to group.
3) Validate and save method.
4) Copy the /System/CommonMethods/QuotaStateMachine/Quota instance to a writable enabled domain.
5) Modify the copied Quota instance to set desired quota test values. for ex: set the quota for cpu only or you can also set it by tagging.
6) Run test(Provision service and/or VMs).

Actual results:
Quota enforcement for user as quota source does not work

Expected results:
Quota enforcement for user as quota source should work

Additional info:

Comment 3 CFME Bot 2016-06-14 21:50:58 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b086426c1b1dbf0cf6cc0fa3db574bf6b7ac4cae

commit b086426c1b1dbf0cf6cc0fa3db574bf6b7ac4cae
Author:     william fitzgerald <wfitzger@redhat.com>
AuthorDate: Tue Jun 14 11:48:54 2016 -0400
Commit:     william fitzgerald <wfitzger@redhat.com>
CommitDate: Tue Jun 14 15:37:18 2016 -0400

    Automate - Quota enforcement for user fix
    
    Modified Log message to display quota source.
    
    Added new spec test for user quota.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1342180
    
    Modified log message to include 'source'.

 .../System/CommonMethods/QuotaMethods.class/__methods__/limits.rb  | 2 +-
 .../CommonMethods/QuotaMethods.class/__methods__/quota_source.rb   | 5 ++++-
 spec/automation/unit/method_validation/quota_source_spec.rb        | 7 +++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

Comment 6 Milan Falešník 2016-10-03 12:10:36 UTC
Verified in 5.7.0.3

When copying and modifying /System/CommonMethods/QuotaStateMachine/quota to user the user as the quota source and when the user is tagged, the quotas are in effect.


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