You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by deepti dohare <de...@citrix.com> on 2012/07/05 08:22:45 UTC

Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

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

Review request for cloudstack.


Description
-------

When an instance is created with data volume, disk offering is not taken into account while checking the account limit. Adding a check for the diskoffering


This addresses bug CS-15429.


Diffs
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java d81ed7d 

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


Testing
-------

Steps: 
1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + user account d2user 
2. login admin, set all resource limits for d1domain to be 2, set all resource limits for d2user to be 3 
3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
   Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"


Thanks,

deepti dohare


RE: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

Posted by Nitin Mehta <Ni...@citrix.com>.
Please also correct the commit message. " When an instance is created with data volume, disk offering is not  taken into account while checking the account limit. Adding a check for the diskoffering"
It should instead say something like this - " When an instance is created with data volume, account limit for this data volume was not checked against. Adding a check for that"

Thanks,
-Nitin
-----Original Message-----
From: Nitin Mehta [mailto:noreply@reviews.apache.org] On Behalf Of Nitin Mehta
Sent: Saturday, July 07, 2012 1:23 AM
To: cloudstack; Deepti Dohare; Nitin Mehta
Subject: Re: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.


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



server/src/com/cloud/vm/UserVmManagerImpl.java
<https://reviews.apache.org/r/5766/#comment18976>

    Please check this - In case the vm is booted from an iso then as well the disk offering is not null and refers to the the root disk offering and not to the data disk offering.


- Nitin Mehta


On July 5, 2012, 6:22 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5766/
> -----------------------------------------------------------
> 
> (Updated July 5, 2012, 6:22 a.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> When an instance is created with data volume, disk offering is not 
> taken into account while checking the account limit. Adding a check 
> for the diskoffering
> 
> 
> This addresses bug CS-15429.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java d81ed7d
> 
> Diff: https://reviews.apache.org/r/5766/diff/
> 
> 
> Testing
> -------
> 
> Steps: 
> 1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + 
> user account d2user 2. login admin, set all resource limits for 
> d1domain to be 2, set all resource limits for d2user to be 3 3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
> 4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
>    Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

Posted by Nitin Mehta <ni...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5766/#review8928
-----------------------------------------------------------



server/src/com/cloud/vm/UserVmManagerImpl.java
<https://reviews.apache.org/r/5766/#comment18976>

    Please check this - In case the vm is booted from an iso then as well the disk offering is not null and refers to the the root disk offering and not to the data disk offering.


- Nitin Mehta


On July 5, 2012, 6:22 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5766/
> -----------------------------------------------------------
> 
> (Updated July 5, 2012, 6:22 a.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> When an instance is created with data volume, disk offering is not taken into account while checking the account limit. Adding a check for the diskoffering
> 
> 
> This addresses bug CS-15429.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java d81ed7d 
> 
> Diff: https://reviews.apache.org/r/5766/diff/
> 
> 
> Testing
> -------
> 
> Steps: 
> 1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + user account d2user 
> 2. login admin, set all resource limits for d1domain to be 2, set all resource limits for d2user to be 3 
> 3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
> 4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
>    Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

Posted by Rajesh Battala <ra...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5766/#review9005
-----------------------------------------------------------

Ship it!


Ship It!

- Rajesh Battala


On July 9, 2012, 1:14 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5766/
> -----------------------------------------------------------
> 
> (Updated July 9, 2012, 1:14 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> When an instance is created with data volume, account limit for this data volume was not checked against. Adding a check for that
> 
> 
> This addresses bug CS-15429.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java b3fac70 
> 
> Diff: https://reviews.apache.org/r/5766/diff/
> 
> 
> Testing
> -------
> 
> Steps: 
> 1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + user account d2user 
> 2. login admin, set all resource limits for d1domain to be 2, set all resource limits for d2user to be 3 
> 3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
> 4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
>    Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

Posted by Nitin Mehta <ni...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5766/#review8980
-----------------------------------------------------------

Ship it!


Ship It!


server/src/com/cloud/vm/UserVmManagerImpl.java
<https://reviews.apache.org/r/5766/#comment19067>

    Don't want to sound overcritical but it would always be nice to add a comment if the logic seems to be unintuitive like here. Always makes life easier to maintain code :).


- Nitin Mehta


On July 9, 2012, 1:14 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5766/
> -----------------------------------------------------------
> 
> (Updated July 9, 2012, 1:14 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> When an instance is created with data volume, account limit for this data volume was not checked against. Adding a check for that
> 
> 
> This addresses bug CS-15429.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java b3fac70 
> 
> Diff: https://reviews.apache.org/r/5766/diff/
> 
> 
> Testing
> -------
> 
> Steps: 
> 1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + user account d2user 
> 2. login admin, set all resource limits for d1domain to be 2, set all resource limits for d2user to be 3 
> 3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
> 4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
>    Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

Posted by deepti dohare <de...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5766/
-----------------------------------------------------------

(Updated July 9, 2012, 1:14 p.m.)


Review request for cloudstack.


Changes
-------

Updating the patch with the fix for handling the scenario when an instance is created from an iso image. If an instance is created from an iso, disk offering is not null and only one root disk volume is created. Making a fix to pass the right resource count if an instance is created from an iso.


Description
-------

When an instance is created with data volume, account limit for this data volume was not checked against. Adding a check for that


This addresses bug CS-15429.


Diffs (updated)
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java b3fac70 

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


Testing
-------

Steps: 
1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + user account d2user 
2. login admin, set all resource limits for d1domain to be 2, set all resource limits for d2user to be 3 
3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
   Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"


Thanks,

deepti dohare


Re: Review Request: CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts.

Posted by deepti dohare <de...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5766/
-----------------------------------------------------------

(Updated July 6, 2012, 8:40 p.m.)


Review request for cloudstack.


Description (updated)
-------

When an instance is created with data volume, account limit for this data volume was not checked against. Adding a check for that


This addresses bug CS-15429.


Diffs
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java d81ed7d 

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


Testing
-------

Steps: 
1. create domains /ROOT/d1 + domain-admin account d1domain /ROOT/d2 + user account d2user 
2. login admin, set all resource limits for d1domain to be 2, set all resource limits for d2user to be 3 
3. login d1domain, create VM 1 with no data volume: succeeded, create VM 2 with data volume, Failed. Error message: Maximum number of resources of type 'volume' for account name=d1domain in domain id=2 has been exceeded.
4. login d2user, create VM 1 and VM2 both with no data volume: succeeded, create VM 3 with data volume:failed, 
   Error message: "Maximum number of resources of type 'volume' for account name=d2user in domain id=3 has been exceeded"


Thanks,

deepti dohare