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



api/src/com/cloud/user/ResourceLimitService.java
<https://reviews.apache.org/r/5806/#comment22750>

    Check the documentation for the function put in here



api/src/com/cloud/user/ResourceLimitService.java
<https://reviews.apache.org/r/5806/#comment22751>

    Check the documentation for the function put in here



api/src/com/cloud/user/ResourceLimitService.java
<https://reviews.apache.org/r/5806/#comment22752>

    Check the documentation for the function put in here



server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
<https://reviews.apache.org/r/5806/#comment22760>

    By changing the functionality of checkResourceLimit you are risking it for 
all the resource creation in the CS.
    Have you tested for them ? 
    
    Instead of touching the existing functions I advise you to rewrite it all 
together and slowly all the owners will move their code to using your functions.



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment22753>

    You are again repeating the code here. You can simply have a failure flag 
which u use in the finally block. I think I passed the feedback in earlier 
reviews for not repeating the code. Please refer to that



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment22755>

    Dont need this loop at all for the same reasons as above



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment22756>

    It would be helpful to say which snapshot failed here so include its uuid, 
name etc



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment22757>

    It would be helpful to say which snapshot failed here so include its uuid 
etc


- Nitin Mehta


On Aug. 16, 2012, 10:46 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5806/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2012, 10:46 a.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> Change:
> 1. Before creating the snapshot, we synchronized checkResourcelimit to allow 
> the users to create the snapshot and increment the resource count.
> 2. Depending on the failure of snapshot creation/ backup, we are decrementing 
> the resource count.
> 
> 
> This addresses bug CS-15430.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/user/ResourceLimitService.java 98dfc11 
>   server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b285d2c 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 6e3f9c1 
> 
> Diff: https://reviews.apache.org/r/5806/diff/
> 
> 
> Testing
> -------
> 
> Steps to verify:
> 1.Login as admin, set snapshot limit '3' for a user account
> 2.login as user, create a VM1 with data volume
> 3.trigger 3 create snapshot command from the above data volume, succeeded
> 4.create one more snapshot, failed, "maximum limit exceeded for account user"
> 
> 
> Thanks,
> 
> deepti dohare
> 
>

Reply via email to