You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Sanjay Tripathi <sa...@citrix.com> on 2013/07/12 11:13:13 UTC

Review Request 12499: CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

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

Review request for cloudstack, Devdeep Singh and Prasanna Santhanam.


Bugs: CLOUDSTACK-3376


Repository: cloudstack-git


Description
-------

    CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

    This issue is happing because of the steps the code follow to cleanup the account.
    The cleanupAccount was deleting the entries from the resource_limit and
    resource_count table and performing further cleaning afterwards. Ideally, deletion
    of entries from resourceLimit and resourceCount should be the last step in
    cleanupAccount process.


Diffs
-----

  server/src/com/cloud/user/AccountManagerImpl.java 283e832 

Diff: https://reviews.apache.org/r/12499/diff/


Testing
-------

Steps I followed to test account cleanup scenario:

1. Create a user account.
2. Login as user.
3. Register a template and deploy an instance using this registered template.
4. Create a project from this user account.
5. Go to project view
6. Register a template and create a volume in this project_account.
7. Logout and login as root-admin.
8. Delete the project manages by the user account.
9. Delete the user account.

In MS logs, verified that cleanupAccount is happing properly.


Thanks,

Sanjay Tripathi


Re: Review Request 12499: CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12499/#review23366
-----------------------------------------------------------


Commit c9548e37885bee6abf62c515c910fe29f9fcd7c6 in branch refs/heads/4.2 from Sanjay Tripathi
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=c9548e3 ]

CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

This issue is happing because of the steps the code follow to cleanup the account.
The cleanupAccount was deleting the entries from the resource_limit and
resource_count table and performing further cleaning afterwards. Ideally, deletion
of entries from resourceLimit and resourceCount should be the last step in
cleanupAccount process.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>
(cherry picked from commit 21b1c9449a1289db9fa92c2ec76a936006100ab3)


- ASF Subversion and Git Services


On July 12, 2013, 9:13 a.m., Sanjay Tripathi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12499/
> -----------------------------------------------------------
> 
> (Updated July 12, 2013, 9:13 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prasanna Santhanam.
> 
> 
> Bugs: CLOUDSTACK-3376
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup
> 
>     This issue is happing because of the steps the code follow to cleanup the account.
>     The cleanupAccount was deleting the entries from the resource_limit and
>     resource_count table and performing further cleaning afterwards. Ideally, deletion
>     of entries from resourceLimit and resourceCount should be the last step in
>     cleanupAccount process.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/user/AccountManagerImpl.java 283e832 
> 
> Diff: https://reviews.apache.org/r/12499/diff/
> 
> 
> Testing
> -------
> 
> Steps I followed to test account cleanup scenario:
> 
> 1. Create a user account.
> 2. Login as user.
> 3. Register a template and deploy an instance using this registered template.
> 4. Create a project from this user account.
> 5. Go to project view
> 6. Register a template and create a volume in this project_account.
> 7. Logout and login as root-admin.
> 8. Delete the project manages by the user account.
> 9. Delete the user account.
> 
> In MS logs, verified that cleanupAccount is happing properly.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>


Re: Review Request 12499: CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

Posted by Prasanna Santhanam <ts...@apache.org>.

> On July 17, 2013, 7:14 a.m., ASF Subversion and Git Services wrote:
> > Commit 21b1c9449a1289db9fa92c2ec76a936006100ab3 in branch refs/heads/master from Sanjay Tripathi
> > [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=21b1c94 ]
> > 
> > CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup
> > 
> > This issue is happing because of the steps the code follow to cleanup the account.
> > The cleanupAccount was deleting the entries from the resource_limit and
> > resource_count table and performing further cleaning afterwards. Ideally, deletion
> > of entries from resourceLimit and resourceCount should be the last step in
> > cleanupAccount process.
> > 
> > Signed-off-by: Prasanna Santhanam <ts...@apache.org>
> >

LGTM. But I'm testing it before applying to 4.2, possibly add an integration test to backup the failure.


- Prasanna


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


On July 12, 2013, 9:13 a.m., Sanjay Tripathi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12499/
> -----------------------------------------------------------
> 
> (Updated July 12, 2013, 9:13 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prasanna Santhanam.
> 
> 
> Bugs: CLOUDSTACK-3376
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup
> 
>     This issue is happing because of the steps the code follow to cleanup the account.
>     The cleanupAccount was deleting the entries from the resource_limit and
>     resource_count table and performing further cleaning afterwards. Ideally, deletion
>     of entries from resourceLimit and resourceCount should be the last step in
>     cleanupAccount process.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/user/AccountManagerImpl.java 283e832 
> 
> Diff: https://reviews.apache.org/r/12499/diff/
> 
> 
> Testing
> -------
> 
> Steps I followed to test account cleanup scenario:
> 
> 1. Create a user account.
> 2. Login as user.
> 3. Register a template and deploy an instance using this registered template.
> 4. Create a project from this user account.
> 5. Go to project view
> 6. Register a template and create a volume in this project_account.
> 7. Logout and login as root-admin.
> 8. Delete the project manages by the user account.
> 9. Delete the user account.
> 
> In MS logs, verified that cleanupAccount is happing properly.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>


Re: Review Request 12499: CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12499/#review23252
-----------------------------------------------------------


Commit 21b1c9449a1289db9fa92c2ec76a936006100ab3 in branch refs/heads/master from Sanjay Tripathi
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=21b1c94 ]

CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup

This issue is happing because of the steps the code follow to cleanup the account.
The cleanupAccount was deleting the entries from the resource_limit and
resource_count table and performing further cleaning afterwards. Ideally, deletion
of entries from resourceLimit and resourceCount should be the last step in
cleanupAccount process.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


- ASF Subversion and Git Services


On July 12, 2013, 9:13 a.m., Sanjay Tripathi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12499/
> -----------------------------------------------------------
> 
> (Updated July 12, 2013, 9:13 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prasanna Santhanam.
> 
> 
> Bugs: CLOUDSTACK-3376
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     CLOUDSTACK-3376: NPE: resource count calculation from the account manager on account cleanup
> 
>     This issue is happing because of the steps the code follow to cleanup the account.
>     The cleanupAccount was deleting the entries from the resource_limit and
>     resource_count table and performing further cleaning afterwards. Ideally, deletion
>     of entries from resourceLimit and resourceCount should be the last step in
>     cleanupAccount process.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/user/AccountManagerImpl.java 283e832 
> 
> Diff: https://reviews.apache.org/r/12499/diff/
> 
> 
> Testing
> -------
> 
> Steps I followed to test account cleanup scenario:
> 
> 1. Create a user account.
> 2. Login as user.
> 3. Register a template and deploy an instance using this registered template.
> 4. Create a project from this user account.
> 5. Go to project view
> 6. Register a template and create a volume in this project_account.
> 7. Logout and login as root-admin.
> 8. Delete the project manages by the user account.
> 9. Delete the user account.
> 
> In MS logs, verified that cleanupAccount is happing properly.
> 
> 
> Thanks,
> 
> Sanjay Tripathi
> 
>