Thanks Devdeep and Deepti for your work. Please file a bug for this issue. 

-----Original Message-----
From: Devdeep Singh [mailto:nore...@reviews.apache.org] On Behalf Of Devdeep 
Singh
Sent: Tuesday, July 10, 2012 12:03 PM
To: cloudstack; Deepti Dohare; Devdeep Singh; Nitin Mehta
Subject: Re: Review Request: CS-15430 Create snapshot should fail if creating 
snapshot results in exceeding snapshot resource limit for domain-admin or user 
accounts.



> On July 10, 2012, 2:23 p.m., Nitin Mehta wrote:
> > server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java, line 
> > 1355 
> > <https://reviews.apache.org/r/5806/diff/2/?file=121206#file121206lin
> > e1355>
> >
> >     Did you inquire how we solve this problem in other places in CS ?  I 
> > cant approve this change since we dont want to reinvent the wheel if this 
> > has already been solved. If it hasn't been solved then I would want to 
> > raise this in the mailing list and hear out a good way of doing this.

We looked into how check and increment resource limits were being handled for 
other resources, like instances. Looking at the code it seems a similar problem 
 may be present there too. However, we have to simulate the scenario (by 
probably suspending threads in a debugger) and confirm it. If the issue is 
present I'll bring up the issue on the list and file bugs for the same.


- Devdeep


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


On July 10, 2012, 1:32 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5806/
> -----------------------------------------------------------
> 
> (Updated July 10, 2012, 1:32 p.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
> -----
> 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 
> 50dcf38
> 
> 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