According to the current scenario, Admin/domain-admin can update resource limit 
to the value lower than the current resource count. Wouldn’t it be appropriate 
to inform admin about this behavior and not to apply the lower limit.  My 
concern is that if, for example, a user has 5 instances and admin changes it to 
2, then we are left with the deployment scenario where limit is exceeded and 
resources are being consumed.

Thanks
Deepti 

 

-----Original Message-----
From: Nitin Mehta 
Sent: Wednesday, August 01, 2012 4:14 PM
To: [email protected]; Prasanna Santhanam; Deepti Dohare
Subject: RE: Review Request: CS-15395 updateResourceLimit does not give any 
warning/error if limit is set lower than the current resources used by an 
account

I think we shouldn’t  make this change. Since resources can always be destroyed 
I would want to give the admin flexibility to set the resource limit to a value 
lower than the current count of resources an account has.
At best you can inform admin that he is trying to set the resource limit to a 
value lower than the current count of resources but you shouldn’t disallow him 
doing it.

Thanks,
-Nitin

-----Original Message-----
From: Prasanna Santhanam [mailto:[email protected]] On Behalf Of 
Prasanna Santhanam
Sent: Wednesday, August 01, 2012 3:36 PM
To: cloudstack; Prasanna Santhanam; Deepti Dohare
Subject: Re: Review Request: CS-15395 updateResourceLimit does not give any 
warning/error if limit is set lower than the current resources used by an 
account


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6276/#review9681
-----------------------------------------------------------


1. Would it not be better to inform the admin of the current resource count? So 
he can take corrective action. Something like :

""
Cannot update the resource limit to <given count>. There are <current count> 
type of resources in use.
""

2. Will this be applicable to domain-admins changing the limits for an account 
under that domain? Looks like it would. Just wanted to confirm.

- Prasanna Santhanam


On Aug. 1, 2012, 8:07 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6276/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2012, 8:07 a.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> If an account already has 2 resources (eg. 2 instances) and root admin 
> decreases that limit to 1, the limit is updated as 1 whereas it has to be 
> discarded. 
> The fix checks for the current resource count.
> 
> 
> This addresses bug CS-15395.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b285d2c 
> 
> Diff: https://reviews.apache.org/r/6276/diff/
> 
> 
> Testing
> -------
> 
> Verified locally.
> 
> 
> Thanks,
> 
> deepti dohare
> 
>

Reply via email to