Bug 761509 - Quota usage does not get updated for non admin user.
Summary: Quota usage does not get updated for non admin user.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Scott Seago
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-08 13:49 UTC by Aziza Karol
Modified: 2012-08-30 17:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-30 17:17:06 UTC


Attachments (Terms of Use)
quota usage for nonadmin (225.74 KB, image/png)
2011-12-08 13:49 UTC, Aziza Karol
no flags Details
user_quota (221.61 KB, image/png)
2012-01-19 06:49 UTC, Shveta
no flags Details
user_quota_with_stopped_inst (216.12 KB, image/png)
2012-01-19 06:51 UTC, Shveta
no flags Details

Description Aziza Karol 2011-12-08 13:49:03 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.As non admin user i launched 4 ec2 instances.
QUOTA USED in overview section does not  reflect the correct count.

see attached screenshot.



Expected results:
should reflect the correct count.

Additional info:
[root@hp-bl480c-01 ~]# rpm -qa | grep aeolus
aeolus-conductor-0.7.0-4.el6.noarch
aeolus-configure-2.4.0-3.el6.noarch
aeolus-conductor-doc-0.7.0-4.el6.noarch
aeolus-all-0.7.0-4.el6.noarch
rubygem-aeolus-cli-0.2.0-3.el6.noarch
rubygem-aeolus-image-0.2.0-1.el6.noarch
aeolus-conductor-daemons-0.7.0-4.el6.noarch

Comment 1 Aziza Karol 2011-12-08 13:49:46 UTC
Created attachment 542538 [details]
quota usage for nonadmin

Comment 2 Scott Seago 2011-12-08 16:54:50 UTC
I can't tell from the screenshot -- what is the state of the 4 instances? This will have an impact on the quota usage.

Comment 3 Scott Seago 2011-12-08 17:01:44 UTC
Oh one other question -- what is the user quota set to? I think I'm seeing the same thing here -- the page is showing '0 of 0', but enforcement seems to be working.

Comment 4 Hugh Brock 2011-12-08 17:45:24 UTC
OK, we (engineering) had not come to our own conclusion about what these numbers mean. Here is that conclusion:

* The "Overview" section is always specific to the user viewing it. This is the guiding principle of that area of the UI. Several things follow from that:

1. QUOTA USED should be the number of running instances owned by the user, and the QUOTA itself should be the user's personal quota.

2. POOLS should be the number of pools the user has permission to launch instances in

3. DEPLOYMENTS  should be the number of deployments the user has launched

4. the numbers in the INSTANCES section are all counts of the user's various instances: Running, Pending, Failed

5. The ALERTS are the count of alerts for that user

Scott let's get all these numbers set right as part of this fix.

Comment 5 Scott Seago 2011-12-09 13:36:07 UTC
The summary page at /pools was giving confusing (and incorrect) stats. Changes are as follows:

Pools:
    before: number of pools the user has view permissions on
    after: number of pools the user has permission to launch deployments in

Deployments:
    before: number of deployments the user has view permission on
    after: number of deployments owned (i.e. launched) by the user

Instances:
    before: number of instances the user has view permissions on
    after: number of instances owned (i.e. launched) by the user

Alerts:
    (we don't really have alerts yet, so this is currently just the 
     number of failed instances)
    before: number of failed instances the user has view permissions on
    after:  number of failed instances the user owns

Quota Used:
    before: aggregated stats for environment quotas on all environments
            that the user has view permisions on. This was the cause
            of the BZ report, as by default, non-admin users have no
            direct permissions on the default environment -- only on 
            the contained default pool. So for non-admin users
            this showed 0 of 0, since it was an aggregation over 
            0 environments.
    after: user quota stats. 

I've also updated the labels for the Overview to show "User Quota Usage" instead of "Quota Usage" and, for the Pool view, "Pool Quota Usage" instead of "Quota Usage" to clarify
which quota measurement is being applied.

Patch here: https://dhcp231-79.rdu.redhat.com/conductor/pools

Comment 6 Scott Seago 2011-12-13 15:49:21 UTC
oops. wrong pasted URL for the patch.

Here: https://fedorahosted.org/pipermail/aeolus-devel/2011-December/007260.html

Comment 7 Scott Seago 2011-12-20 18:29:08 UTC
Pushed to Master.

Comment 8 Steve Linabery 2012-01-10 17:29:09 UTC
ef2c43d7dc02e909026c730933c55400b703a86d in aeolus-conductor-0.8.0-2.el6.src.rpm

Comment 9 wes hayutin 2012-01-12 16:16:27 UTC
bugs in verified or on_qa moving off tracker

Comment 10 Shveta 2012-01-19 06:48:56 UTC
Correct count is displayed for non admin user

Launched two instance (quota set to 5 ) 
Shows 40% usage ( 2 of 5 ) 

Stopped one instance , shows 20 % usage ( 1 of 5 ) 

=========================================================

Verified in

 rpm -qa|grep aeolus
aeolus-conductor-0.8.0-8.el6.noarch
aeolus-all-0.8.0-8.el6.noarch
aeolus-conductor-daemons-0.8.0-8.el6.noarch
rubygem-aeolus-image-0.3.0-3.el6.noarch
aeolus-configure-2.5.0-5.el6.noarch
rubygem-aeolus-cli-0.3.0-4.el6.noarch
aeolus-conductor-doc-0.8.0-8.el6.noarch

Comment 11 Shveta 2012-01-19 06:49:35 UTC
Created attachment 556190 [details]
user_quota

Comment 12 Shveta 2012-01-19 06:51:07 UTC
Created attachment 556191 [details]
user_quota_with_stopped_inst


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